1
HI我需要執行HMACSHA256加密請幫助我;JAVA -HMACSHA256
sha256 = MessageDigest.getInstance("HMACSHA1"); //I get exception in this line (No algorithm found)
HI我需要執行HMACSHA256加密請幫助我;JAVA -HMACSHA256
sha256 = MessageDigest.getInstance("HMACSHA1"); //I get exception in this line (No algorithm found)
Mac hmacSha256 = Mac.getInstance("hmacSHA256");
散列和Mac-ING都沒有加密。
如果你要求SHA-1,你將得到SHA-1,而不是SHA-256。另外,如果你與'MessageDigest'交談,你會得到一個「消息摘要」(一個散列函數),而不是一個MAC。 – 2011-03-03 13:28:00