在此记录下踩过的坑,解密key 一定弄明白是用 商户级别的key还是服务商级别的key,看各自账户的性质决定。key不对就导致 gcmBlockCipher.DoFinal(plaintext, length); 这一步报错,抛异常
.net版微信支付分支付回调数据如何解密?1.解密方法己找到。 [图片] public class AesGcm { private static string ALGORITHM = "AES/GCM/NoPadding"; private static int TAG_LENGTH_BIT = 128; private static int NONCE_LENGTH_BYTE = 12; private static string AES_KEY = "qrmmdt198611qrmmdt198611qrmmdt19"; public static string AesGcmDecrypt(string content, string key, string ivs) { byte[] bytes = Encoding.UTF8.GetBytes(key); byte[] bytes2 = Encoding.UTF8.GetBytes(ivs); byte[] array = Convert.FromBase64String(content); byte[] bytes3 = Encoding.UTF8.GetBytes("certificate"); GcmBlockCipher gcmBlockCipher = new GcmBlockCipher(new AesEngine()); AeadParameters aeadParameters = new AeadParameters(new KeyParameter(bytes), 128, bytes2, bytes3); gcmBlockCipher.Init(false, aeadParameters); byte[] array2 = new byte[gcmBlockCipher.GetOutputSize(array.Length)]; int num = gcmBlockCipher.ProcessBytes(array, 0, array.Length, array2, 0); gcmBlockCipher.DoFinal(array2, num); return Encoding.UTF8.GetString(array2); } } 请问这个方法的3个参数应该如何传值;
2022-01-07急待解决
C盘中的微信开发者工具UserData可以移到别的盘吗?[图片]
2021-09-18