Ejemplo n.º 1
0
 public byte[] Encrypt(byte[] data)
 {
     //System.Security.Cryptography.AesCryptoServiceProvider
     //System.Security.Cryptography.DESCryptoServiceProvider
     //System.Security.Cryptography.DSACryptoServiceProvider
     //System.Security.Cryptography.MD5CryptoServiceProvider
     //System.Security.Cryptography.RC2CryptoServiceProvider
     //System.Security.Cryptography.RNGCryptoServiceProvider
     //System.Security.Cryptography.RSACryptoServiceProvider
     //System.Security.Cryptography.SHA1CryptoServiceProvider
     //System.Security.Cryptography.SHA256CryptoServiceProvider
     //System.Security.Cryptography.SHA384CryptoServiceProvider
     //System.Security.Cryptography.SHA512CryptoServiceProvider
     return(CipherUtility.Encrypt <DESCryptoServiceProvider>(data, _key, _salt));
 }
Ejemplo n.º 2
0
 public byte[] Decrypt(byte[] data)
 {
     return(CipherUtility.Decrypt <RC2CryptoServiceProvider>(data, _key, _salt));
 }
Ejemplo n.º 3
0
 public byte[] Encrypt(byte[] data)
 {
     return(CipherUtility.Encrypt <AesCryptoServiceProvider>(data, _key, _salt));
 }
Ejemplo n.º 4
0
 public byte[] Decrypt(byte[] data)
 {
     return CipherUtility.Decrypt<TripleDESCryptoServiceProvider>(data, _key, _salt);
 }