public enum BuiltinSignatures extends Enum<BuiltinSignatures> implements SignatureFactory
Modifier and Type | Class and Description |
---|---|
static class |
BuiltinSignatures.ParseResult
Holds the result of the
parseSignatureList(String) |
BuiltinFactory.Utils
Enum Constant and Description |
---|
dsa |
nistp256 |
nistp384 |
nistp521 |
rsa |
Modifier and Type | Field and Description |
---|---|
static Set<BuiltinSignatures> |
VALUES |
BY_NAME_COMPARATOR, NAME_EXTRACTOR
FALSE, TRUE
public static final BuiltinSignatures dsa
public static final BuiltinSignatures rsa
public static final BuiltinSignatures nistp256
public static final BuiltinSignatures nistp384
public static final BuiltinSignatures nistp521
public static final Set<BuiltinSignatures> VALUES
public static BuiltinSignatures[] values()
for (BuiltinSignatures c : BuiltinSignatures.values()) System.out.println(c);
public static BuiltinSignatures 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 static Signature getByCurveSize(ECParameterSpec params)
public final String getName()
getName
in interface NamedResource
public final String toString()
toString
in class Enum<BuiltinSignatures>
public boolean isSupported()
isSupported
in interface OptionalFeature
public static void registerExtension(SignatureFactory extension)
NamedFactory
to be available besides the built-in
ones when parsing configurationextension
- The factory to registerIllegalArgumentException
- if factory instance is null
,
or overrides a built-in one or overrides another registered factory
with the same name (case insensitive).public static SortedSet<SignatureFactory> getRegisteredExtensions()
SortedSet
of the currently registered extensions, sorted
according to the factory name (case insensitive)public static SignatureFactory unregisterExtension(String name)
name
- The factory name - ignored if null
/emptynull
if not foundpublic static BuiltinSignatures fromString(String s)
s
- The Enum
's name - ignored if null
/emptyBuiltinSignatures
whose Enum.name()
matches
(case insensitive) the provided argument - null
if no matchpublic static BuiltinSignatures fromFactory(NamedFactory<Signature> factory)
factory
- The NamedFactory
for the signature - ignored if null
BuiltinSignatures
whose factory name matches
(case insensitive) the digest factory namefromFactoryName(String)
public static BuiltinSignatures fromFactoryName(String name)
name
- The factory name - ignored if null
/emptyBuiltinSignatures
whose factory name matches
(case insensitive) the provided name - null
if no matchpublic static BuiltinSignatures.ParseResult parseSignatureList(String sigs)
sigs
- A comma-separated list of signatures' names - ignored
if null
/emptyBuiltinSignatures.ParseResult
of all the NamedFactory
whose
name appears in the string and represent a built-in signature. Any
unknown name is ignored. The order of the returned result
is the same as the original order - bar the unknown signatures.
Note: it is up to caller to ensure that the list does not
contain duplicatespublic static BuiltinSignatures.ParseResult parseSignatureList(String... sigs)
public static BuiltinSignatures.ParseResult parseSignatureList(Collection<String> sigs)
public static SignatureFactory resolveFactory(String name)
name
- The factory namenull
if it is neither a built-in one
or a registered extensionCopyright © 2008–2016 The Apache Software Foundation. All rights reserved.