JAVA -HMACSHA256

Byt*_*ode 1 java encryption

我需要执行HMACSHA256加密请帮帮我;

 sha256 = MessageDigest.getInstance("HMACSHA1"); //I get exception in this line (No algorithm found)
Run Code Online (Sandbox Code Playgroud)

Jam*_*olk 8

Mac hmacSha256 = Mac.getInstance("hmacSHA256");
Run Code Online (Sandbox Code Playgroud)

哈希和Mac-ing不是加密.