コード例 #1
0
        /// <summary>
        /// 使用3DES解密
        /// </summary>
        public static byte[] Decrypt(byte[] encrypted, string key)
        {
            DesEncryption desEncryption = new DesEncryption(DesStrategy.Des3, key);

            return(desEncryption.Decrypt(encrypted));
        }
コード例 #2
0
 /// <summary>
 /// 使用3DES解密字符串
 /// </summary>
 public static string DecryptString(string encrypted, string key)
 {
     byte[] buff = System.Text.Encoding.UTF8.GetBytes(encrypted);
     byte[] res  = DesEncryption.Decrypt(buff, key);
     return(System.Text.Encoding.UTF8.GetString(res));
 }
コード例 #3
0
 /// <summary>
 /// 使用3DES解密
 /// </summary> 
 public static byte[] Decrypt(byte[] encrypted, string key)
 {
     DesEncryption desEncryption = new DesEncryption(DesStrategy.Des3, key);
     return desEncryption.Decrypt(encrypted);
 }