
| C# Usage Example |
|
using
SladeHome.SimpleCrypto; .... .... string hashed = Crypto.GetMD5Hash("Hello World"); Console.WriteLine("Hashed Value: " + hashed); string encrypted = Crypto.EncryptTripleDES("Hello World", "MyPassPhrase"); Console.WriteLine("Encrypted Text: " + encrypted); string decrypted = Crypto.DecryptTripleDES(encrypted, "MyPassPhrase"); Console.WriteLine("Decrypted Text: " + decrypted); |
| VB.NET Usage Example |
|
Imports
SladeHome.SimpleCrypto .... .... Dim hashed As String = Crypto.GetMD5Hash("Hello World") Console.WriteLine("Hashed Value: " + hashed) Dim encrypted As String = Crypto.EncryptTripleDES("Hello World", "MyPassPhrase") Console.WriteLine("Encrypted Text: " + encrypted) Dim decrypted As String = Crypto.DecryptTripleDES(encrypted, "MyPassPhrase") Console.WriteLine("Decrypted Text: " + decrypted) |
| SimpleCrypto Source |
|
using
System; using System.Security.Cryptography; using System.Text;
/* namespace SladeHome.SimpleCrypto{
///
<summary> public class Crypto{
///
<summary> }
///
<summary>
///
<summary>
///
<summary>
|
Provides simple to use cryptographic services for generating Base64 MD5 Hash and performing TripleDES encryption/decryption using a password key.