我创建了一个加密类,它使用带有AesCryptoServiceProvider哈希的HMACSHA256类对数据进行加密和解密。我们的目标是用FIPS兼容的东西替换我们现有的加密类。using (HMACSHA256 hmac = new HMACSHA256(saltData.AuthenticationKey)) //our stream, and write it back into the stream for verification during d
在之前的中测试java和c# hmacsha256实现输出之间的差异时,我注意到输出略有不同,即当我运行java代码时,输出是 SecretKeySpec signingKey = new SecretKeySpec(secretKey, "HmacSHA256");
Mac mac = Mac.getInstance("Hmac