.NET Encryption Library Usage

Using the Kellerman .NET Encryption Library is easy. Instantiate the object and call a method.
 

//Instantiate the Kellerman Encryption Library

Encryption oEncrypt = new Encryption ();

//Encrypt/Decrypt a Visa Credit Card Number

string encryptedString = oEncrypt.EncryptString( EncryptionProvider .Rijndael, "MyPasswordKey" , "4012888818888" );

string decryptedString = oEncrypt.DecryptString( EncryptionProvider .Rijndael, "MyPasswordKey" , encryptedString);
 
//Encrypt/Decrypt a file

oEncrypt.EncryptFile(

EncryptionProvider .Rijndael, "MyPasswordKey" , "c:\\testfile.txt" , "c:\\encrypted.txt" );

oEncrypt.DecryptFile(

EncryptionProvider .Rijndael, "MyPasswordKey" , "c:\\encrypted.txt" , "c:\\decrypted.txt" );

//One Way Hash a password 

oEncrypt.HashString(

HashProvider .HAVAL, "SecretPassword" );

//Compress/Decompress a File

oEncrypt.CompressFile(

CompressionType .GZip, "c:\\testfile.txt" , "c:\\testfile.gz" );

oEncrypt.DecompressFile(

CompressionType .GZip, "c:\\testfile.gz" , "c:\\decompressed.txt" );

//Secure erase a file

oEncrypt.SecureFileErase(

"c:\\decompressed.txt" );