public enum HashDigest extends Enum<HashDigest>
Enum Constant and Description |
---|
MD5
MD5
|
SHA1
SHA-1
|
SHA224
SHA-224
|
SHA256
SHA-256
|
SHA384
SHA-384
|
SHA512
SHA-512
|
Modifier and Type | Method and Description |
---|---|
String |
getDigest() |
MessageDigest |
getMessageDigest() |
static MessageDigest |
getMessageDigest(String digest) |
static HashDigest |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HashDigest[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HashDigest MD5
public static final HashDigest SHA1
public static final HashDigest SHA224
public static final HashDigest SHA256
public static final HashDigest SHA384
public static final HashDigest SHA512
public static HashDigest[] values()
for (HashDigest c : HashDigest.values()) System.out.println(c);
public static HashDigest valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getDigest()
public MessageDigest getMessageDigest()
public static MessageDigest getMessageDigest(String digest)
Copyright © 2024. All rights reserved.