Esempio n. 1
0
 /// <summary>
 /// 使用AES算法解密字节数组
 /// </summary>
 /// <param name="input"></param>
 /// <param name="password"></param>
 /// <returns></returns>
 public static byte[] Decrypt(byte[] input, string password)
 {
     using (SymmetricAlgorithm sa = GetProvider(password)) {
         return(CryptoHelper.Decrypt(input, sa));
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 使用AES算法解密字节数组
 /// </summary>
 /// <param name="input"></param>
 /// <param name="password"></param>
 /// <returns></returns>
 public static byte[] Decrypt(byte[] input, string password)
 {
     return(CryptoHelper.Decrypt(input, GetAesCryptoServiceProvider(password)));
 }
Esempio n. 3
0
 /// <summary>
 /// 使用AES算法解密一个以Base64编码的加密字符串
 /// </summary>
 /// <param name="base64"></param>
 /// <param name="password"></param>
 /// <returns></returns>
 public static string Decrypt(string base64, string password)
 {
     using (SymmetricAlgorithm sa = GetProvider(password)) {
         return(CryptoHelper.Decrypt(base64, sa));
     }
 }
Esempio n. 4
0
 /// <summary>
 /// 使用AES算法解密一个以Base64编码的加密字符串
 /// </summary>
 /// <param name="base64"></param>
 /// <param name="password"></param>
 /// <returns></returns>
 public static string Decrypt(string base64, string password)
 {
     return(CryptoHelper.Decrypt(base64, GetAesCryptoServiceProvider(password)));
 }