public enum HashAlgorithm extends java.lang.Enum<HashAlgorithm>
| Modifier and Type | Field and Description |
|---|---|
int |
blockSize |
static int |
MIN_KEY_SIZE |
byte |
value |
| Modifier and Type | Method and Description |
|---|---|
static HashAlgorithm |
fromString(java.lang.String value) |
static HashAlgorithm |
fromValue(byte value) |
byte[] |
prepareKey(byte[] key) |
static HashAlgorithm |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static HashAlgorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HashAlgorithm SHA1
public static final HashAlgorithm SHA256
public static final HashAlgorithm SHA512
public static int MIN_KEY_SIZE
public final byte value
public final int blockSize
public static HashAlgorithm[] values()
for (HashAlgorithm c : HashAlgorithm.values()) System.out.println(c);
public static HashAlgorithm 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 byte[] prepareKey(byte[] key)
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmExceptionpublic static HashAlgorithm fromValue(byte value)
public static HashAlgorithm fromString(java.lang.String value)