Enum Constant and Description |
---|
SHA2_256 |
Modifier and Type | Method and Description |
---|---|
static byte[] |
mac(HMAC hash,
byte[] key,
byte[] data) |
static byte[] |
macWithSHA256(byte[] K,
byte[] text) |
static HMAC |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static HMAC[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static boolean |
verify(HMAC hash,
byte[] key,
byte[] data,
byte[] mac) |
static boolean |
verifyWithSHA256(byte[] K,
byte[] text,
byte[] mac) |
public static final HMAC SHA2_256
public static HMAC[] values()
for (HMAC c : HMAC.values()) System.out.println(c);
public static HMAC 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 byte[] mac(HMAC hash, byte[] key, byte[] data)
public static boolean verify(HMAC hash, byte[] key, byte[] data, byte[] mac)
public static byte[] macWithSHA256(byte[] K, byte[] text)
public static boolean verifyWithSHA256(byte[] K, byte[] text, byte[] mac)