byte[] encryptedData =Convert.FromBase64String(text); 解出来是160位数组 transform.TransformFinalBlock(encryptedData, 0, encryptedData.Length);提示“填充无效,无法被移除。”
加密数据解密算法怎么没有提供C#的?加密数据解密算法怎么没有提供C#的? 或者给个例子。
2019-11-01byte[] encryptedData =Convert.FromBase64String(text); 解出来是160位数组 transform.TransformFinalBlock(encryptedData, 0, encryptedData.Length);提示“填充无效,无法被移除。”
C# 微信个人信息解密byte[] encryptedData = Convert.FromBase64String(edata); // strToToHexByte(text); RijndaelManaged rijndaelCipher = new RijndaelManaged(); rijndaelCipher.Key = Convert.FromBase64String(aesKey); // Encoding.UTF8.GetBytes(AesKey); rijndaelCipher.IV = Convert.FromBase64String(iv);// Encoding.UTF8.GetBytes(AesIV); rijndaelCipher.Mode = CipherMode.CBC; rijndaelCipher.Padding = PaddingMode.PKCS7; ICryptoTransform transform = rijndaelCipher.CreateDecryptor(); byte[] plainText = transform.TransformFinalBlock(encryptedData, 0, encryptedData.Length); var result = Encoding.UTF8.GetString(plainText); 代码如上 解密出现 填充无效,无法被移除。 解密用户手机号没有问题
2019-11-01