@Immutable public static enum SecureHash.Algorithm extends Enum<SecureHash.Algorithm>
Enum Constant and Description |
---|
MD2 |
MD5 |
SHA_1 |
SHA_256 |
SHA_384 |
SHA_512 |
Modifier and Type | Method and Description |
---|---|
String |
description() |
String |
digestName() |
int |
getHexadecimalStringLength()
Get the length of the hexadecimal representation.
|
int |
getNumberOfBits()
Get the number of bits that make up a digest.
|
int |
getNumberOfBytes()
Get the length of the hexadecimal representation.
|
boolean |
isHexadecimal(String string)
Determine whether the supplied string is of the correct format to contain a hexadecimal representation of this
algorithm.
|
String |
toString() |
static SecureHash.Algorithm |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SecureHash.Algorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SecureHash.Algorithm MD2
public static final SecureHash.Algorithm MD5
public static final SecureHash.Algorithm SHA_1
public static final SecureHash.Algorithm SHA_256
public static final SecureHash.Algorithm SHA_384
public static final SecureHash.Algorithm SHA_512
public static SecureHash.Algorithm[] values()
for (SecureHash.Algorithm c : SecureHash.Algorithm.values()) System.out.println(c);
public static SecureHash.Algorithm 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 digestName()
public String description()
public int getHexadecimalStringLength()
public boolean isHexadecimal(String string)
string
- the string; may not be nullpublic int getNumberOfBytes()
public int getNumberOfBits()
public String toString()
toString
in class Enum<SecureHash.Algorithm>
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.