VB example Delphi example VC++ example C# example VB.NET example
You can freely replace the word "encrypt" with "decrypt" to find out how to decrypt data because encrypting and decrypting work exactly the same way.
To encrypt data with Rijndael or Twofish from file to file in a single pass, perform the following 4 steps. Put the Xceed Encryption control on a form or instantiate it, then:
Specify the encryption method to use. To do this, create an instance of the XceedRijndaelEncryptionMethod object or the XceedTwofishEncryptionMethod object and assign it to the EncryptionMethod property.
Specify the Secret Key to use. To do this from a PassPhrase , use the SetSecretKeyFromPassPhrase method that belongs to the Encryption Method object you assigned to the EncryptionMethod property.
Tell the library to encrypt. To do this, call the ProcessFile method, passing your source and destination filenames as well as True for the bEndOfData parameter.
Make sure that everything worked properly. To do this, use your language's error handling object or errwor handling capabilities. The Xceed Encryption Library supports standard COM error handling functionality.
To encrypt data with RSA from file to file in a single pass, perform the following 4 steps. Put the Xceed Encryption control on a form or instantiate it, then:
Specify the encryption method to use. To do this, create an instance of the XceedRSAEncryptionMethod object and assign it to the EncryptionMethod property.
If you are encrypting, specify the Public Key to use. To do this, set the PublicKey property that belongs to the XceedRSAEncryptionMethod object you assigned to the EncryptionMethod property. If you are decrypting, specify the Private Key to use. To do this, set the PrivateKey property instead. If you need to create an RSA-compatible Public Key and Private Key pair to use, then call the SetRandomKeyPair method and retrieve the keys from the PublicKey and PrivateKey properties.
Tell the library to encrypt. To do this, call the ProcessFile method, passing your source and destination filenames as well as True for the bEndOfData parameter.
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.