public enum BuiltinDigests extends java.lang.Enum<BuiltinDigests> implements DigestFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
BuiltinDigests.Constants |
| Enum Constant and Description |
|---|
md5 |
sha1 |
sha224 |
sha256 |
sha384 |
sha512 |
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
algorithm |
private int |
blockSize |
private java.lang.String |
factoryName |
private boolean |
supported |
static java.util.Set<BuiltinDigests> |
VALUES |
BY_NAME_COMPARATOR, NAME_EXTRACTORFALSE, TRUE| Modifier and Type | Method and Description |
|---|---|
Digest |
create() |
static BuiltinDigests |
fromAlgorithm(java.lang.String algo) |
static BuiltinDigests |
fromDigest(Digest d) |
static BuiltinDigests |
fromFactory(NamedFactory<? extends Digest> factory) |
static BuiltinDigests |
fromFactoryName(java.lang.String name) |
static BuiltinDigests |
fromString(java.lang.String s) |
java.lang.String |
getAlgorithm() |
int |
getBlockSize() |
java.lang.String |
getName() |
boolean |
isSupported() |
java.lang.String |
toString() |
static BuiltinDigests |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static BuiltinDigests[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOfcreate, setUpBuiltinFactories, setUpTransformedFactoriesfindByName, getNameList, getNames, ofName, removeByNameall, any, ofpublic static final BuiltinDigests md5
public static final BuiltinDigests sha1
public static final BuiltinDigests sha224
public static final BuiltinDigests sha256
public static final BuiltinDigests sha384
public static final BuiltinDigests sha512
public static final java.util.Set<BuiltinDigests> VALUES
private final java.lang.String algorithm
private final int blockSize
private final java.lang.String factoryName
private final boolean supported
public static BuiltinDigests[] values()
for (BuiltinDigests c : BuiltinDigests.values()) System.out.println(c);
public static BuiltinDigests 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 final java.lang.String getName()
getName in interface NamedResourcepublic final java.lang.String getAlgorithm()
getAlgorithm in interface AlgorithmNameProviderpublic final int getBlockSize()
getBlockSize in interface DigestInformationpublic final java.lang.String toString()
toString in class java.lang.Enum<BuiltinDigests>public final Digest create()
public final boolean isSupported()
isSupported in interface OptionalFeaturepublic static BuiltinDigests fromString(java.lang.String s)
s - The Enum's name - ignored if null/emptyBuiltinDigests whose Enum.name() matches
(case insensitive) the provided argument - null if no matchpublic static BuiltinDigests fromFactory(NamedFactory<? extends Digest> factory)
factory - The NamedFactory for the cipher - ignored if nullBuiltinDigests whose factory name matches
(case insensitive) the digest factory namefromFactoryName(String)public static BuiltinDigests fromFactoryName(java.lang.String name)
name - The factory name - ignored if null/emptyBuiltinDigests whose factory name matches
(case insensitive) the provided name - null if no matchpublic static BuiltinDigests fromDigest(Digest d)
d - The Digest instance - ignored if nullBuiltinDigests whose algorithm matches
(case insensitive) the digets's algorithm - null if no matchpublic static BuiltinDigests fromAlgorithm(java.lang.String algo)
algo - The algorithm to find - ignored if null/emptyBuiltinDigests whose algorithm matches
(case insensitive) the provided name - null if no match