public enum MacAlgorithm extends java.lang.Enum<MacAlgorithm> implements JwsAlgorithm
| Enum Constant and Description |
|---|
HS256
HMAC using SHA-256 (Required)
|
HS384
HMAC using SHA-384 (Optional)
|
HS512
HMAC using SHA-512 (Optional)
|
| Modifier and Type | Method and Description |
|---|---|
static MacAlgorithm |
from(java.lang.String name)
Attempt to resolve the provided algorithm name to a
MacAlgorithm. |
java.lang.String |
getName()
Returns the algorithm name.
|
static MacAlgorithm |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MacAlgorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MacAlgorithm HS256
public static final MacAlgorithm HS384
public static final MacAlgorithm HS512
public static MacAlgorithm[] values()
for (MacAlgorithm c : MacAlgorithm.values()) System.out.println(c);
public static MacAlgorithm valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static MacAlgorithm from(java.lang.String name)
MacAlgorithm.name - the algorithm nameMacAlgorithm, or null if not foundpublic java.lang.String getName()
getName in interface JwsAlgorithm