VB example Delphi example VC++ example C# example VB.NET example
How to obtain the digital signature of data in a memory buffer in a single pass
How to obtain the digital signature of streaming data
To create the digital signature of a memory buffer in a single pass, perform the following 5 steps. Put the Xceed Signing control on a form or instantiate it, then:
Specify the signing method to use. To do this, create an instance of the XceedRSASigningMethod object and assign it to the SigningMethod property.
Specify the Private Key to use. To do this, set the XceedRSASigningMethod object's PrivateKey property. If you don't have a Private Key , you can generate a PrivateKey -PublicKey pair by calling the SetRandomKeyPair method, which will place a Private Key in the PrivateKey property, and the corresponding Public Key in the PublicKey property.
Tell the library to sign the data. To do this, call the Sign method, passing the memory buffer containing the data to sign and True for the bEndOfData parameter.
Obtain the digital signature. To do this, read the contents of the Signature property.
Make sure that everything worked properly. To do this, use your language's error handling object or error handling capabilities. The Xceed Encryption Library supports standard COM error handling functionality.
To create a digital signature from streaming memory data, perform the following steps. Put the Xceed Signing control on a form or instantiate it, then:
Specify the signing method to use. To do this, create an instance of the XceedRSASigningMethod object and assign it to the SigningMethod property.
Specify the Private Key to use. To do this, set the XceedRSASigningMethod object's PrivateKey property. If you don't have a Private Key , you can generate a PrivateKey -PublicKey pair by calling the SetRandomKeyPair method, which will place a Private Key in the PrivateKey property, and the corresponding Public Key in the PublicKey property.
Provide some data to the library to sign. To do this, call the Sign method, passing the first buffer of data to digitally sign, and False for the bEndOfData parameter.
Continue providing data to sign. Call the Sign method again with more buffers, always specifying False for bEndOfData. When you have provided the final buffer to the library, set bEndOfData to True when calling the Sign method.
Obtain the digital signature. To do this, read the contents of the Signature property.
Make sure that everything worked properly. To do this, use your language's error handling object or error handling capabilities. The Xceed Encryption Library supports standard COM error handling functionality.