Exemplo n.º 1
0
 public static String Encrypt(SymmetricEncryptType encryptType, String originalString, String ivString, String keyString) {
     var encrypt = new SymmetricEncrypt(encryptType) {
         IvString = ivString,
         KeyString = keyString
     };
     return encrypt.Encrypt(originalString);
 }
Exemplo n.º 2
0
 public static String Decrypt(SymmetricEncryptType encryptType, String encryptedString, String ivString, String keyString) {
     var encrypt = new SymmetricEncrypt(encryptType) {
         IvString = ivString,
         KeyString = keyString
     };
     return encrypt.Decrypt(encryptedString);
 }