MCPcopy Index your code
hub / github.com/auth0/java-jwt / HMAC256

Method HMAC256

lib/src/main/java/com/auth0/jwt/algorithms/Algorithm.java:138–140  ·  view source on GitHub ↗

Creates a new Algorithm instance using HmacSHA256. Tokens specify this as "HS256". @param secret the secret bytes to use in the verify or signing instance. Ensure the length of the secret is at least 256 bit long @return a valid HMAC256 Algorithm. @throws IllegalArgumentException if t

(String secret)

Source from the content-addressed store, hash-verified

136 * @throws IllegalArgumentException if the provided Secret is null.
137 */
138 public static Algorithm HMAC256(String secret) throws IllegalArgumentException {
139 return new HMACAlgorithm("HS256", "HmacSHA256", secret);
140 }
141
142 /**
143 * Creates a new Algorithm instance using HmacSHA256. Tokens specify this as "HS256".

Callers 15

shouldGetAlgorithmMethod · 0.95
shouldGetSignatureMethod · 0.95
shouldGetIssuerMethod · 0.95
shouldGetSubjectMethod · 0.95
shouldGetNotBeforeMethod · 0.95
shouldGetIssuedAtMethod · 0.95
shouldGetIdMethod · 0.95
shouldGetContentTypeMethod · 0.95

Calls

no outgoing calls

Tested by 15

shouldGetAlgorithmMethod · 0.76
shouldGetSignatureMethod · 0.76
shouldGetIssuerMethod · 0.76
shouldGetSubjectMethod · 0.76
shouldGetNotBeforeMethod · 0.76
shouldGetIssuedAtMethod · 0.76
shouldGetIdMethod · 0.76
shouldGetContentTypeMethod · 0.76