XceedEncryptionLib.XceedEncryption encrypt = new XceedEncryptionLib.XceedEncryptionClass();
encrypt.License( @"your license key" );
XceedEncryptionLib.XceedRijndaelEncryptionMethod rijndael = new XceedEncryptionLib.XceedRijndaelEncryptionMethodClass();
object source = "This is the data to encrypt";
try
{
rijndael.SetSecretKeyFromPassPhrase( "This is a weak pass phrase", 128 );
encrypt.EncryptionMethod = rijndael;
encrypt.WriteFile( ref source, XceedEncryptionLib.EXEFileProcessing.efpEncrypt, true,
@"c:\test\file.enc", false );
}
catch( System.Runtime.InteropServices.COMException except )
{
MessageBox.Show( except.ToString() );
}