public enum BuiltinDigests extends Enum<BuiltinDigests> implements DigestFactory
Modifier and Type | Class and Description |
---|---|
static class |
BuiltinDigests.Constants |
NamedFactory.Utils
OptionalFeature.Utils
Enum Constant and Description |
---|
md5 |
sha1 |
sha224 |
sha256 |
sha384 |
sha512 |
Modifier and Type | Field and Description |
---|---|
static Set<BuiltinDigests> |
VALUES |
BY_NAME_COMPARATOR, NAME_EXTRACTOR
FALSE, TRUE
Modifier and Type | Method and Description |
---|---|
Digest |
create() |
static BuiltinDigests |
fromAlgorithm(String algo) |
static BuiltinDigests |
fromDigest(Digest d) |
static BuiltinDigests |
fromFactory(NamedFactory<? extends Digest> factory) |
static BuiltinDigests |
fromFactoryName(String name) |
static BuiltinDigests |
fromString(String s) |
String |
getAlgorithm() |
int |
getBlockSize() |
String |
getName() |
boolean |
isSupported() |
String |
toString() |
static BuiltinDigests |
valueOf(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.
|
public 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 Set<BuiltinDigests> VALUES
public static BuiltinDigests[] values()
for (BuiltinDigests c : BuiltinDigests.values()) System.out.println(c);
public static BuiltinDigests 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 final String getName()
getName
in interface NamedResource
public final String getAlgorithm()
getAlgorithm
in interface DigestInformation
public final int getBlockSize()
getBlockSize
in interface DigestInformation
public final String toString()
toString
in class Enum<BuiltinDigests>
public final Digest create()
public final boolean isSupported()
isSupported
in interface OptionalFeature
public static BuiltinDigests fromString(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 null
BuiltinDigests
whose factory name matches
(case insensitive) the digest factory namefromFactoryName(String)
public static BuiltinDigests fromFactoryName(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 null
BuiltinDigests
whose algorithm matches
(case insensitive) the digets's algorithm - null
if no matchpublic static BuiltinDigests fromAlgorithm(String algo)
algo
- The algorithm to find - ignored if null
/emptyBuiltinDigests
whose algorithm matches
(case insensitive) the provided name - null
if no matchCopyright © 2008–2016 The Apache Software Foundation. All rights reserved.