public enum BuiltinMacs extends Enum<BuiltinMacs> implements MacFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
BuiltinMacs.Constants |
static class |
BuiltinMacs.ParseResult |
| Enum Constant and Description |
|---|
hmacmd5
Deprecated.
|
hmacmd596
Deprecated.
|
hmacsha1 |
hmacsha196
Deprecated.
|
hmacsha1etm |
hmacsha256
See RFC 6668
|
hmacsha256etm |
hmacsha512
See RFC 6668
|
hmacsha512etm |
| Modifier and Type | Field and Description |
|---|---|
static Set<BuiltinMacs> |
VALUES |
BY_NAME_COMPARATOR, NAME_EXTRACTORFALSE, TRUE| Modifier and Type | Method and Description |
|---|---|
Mac |
create() |
static BuiltinMacs |
fromFactory(NamedFactory<Mac> factory) |
static BuiltinMacs |
fromFactoryName(String name) |
static BuiltinMacs |
fromString(String s) |
String |
getAlgorithm() |
int |
getBlockSize() |
int |
getDefaultBlockSize() |
String |
getName() |
static NavigableSet<MacFactory> |
getRegisteredExtensions() |
boolean |
isSupported() |
static BuiltinMacs.ParseResult |
parseMacsList(Collection<String> macs) |
static BuiltinMacs.ParseResult |
parseMacsList(String... macs) |
static BuiltinMacs.ParseResult |
parseMacsList(String macs) |
static void |
registerExtension(MacFactory extension)
Registered a
NamedFactory to be available besides the built-in ones when parsing configuration |
static MacFactory |
resolveFactory(String name) |
String |
toString() |
static MacFactory |
unregisterExtension(String name)
Unregisters specified extension
|
static BuiltinMacs |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BuiltinMacs[] |
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, valueOfisEncryptThenMacsetUpFactoriescreate, setUpBuiltinFactories, setUpTransformedFactoriesfindByName, findFirstMatchByName, getNameList, getNames, ofName, removeByName, safeCompareByNameall, any, of@Deprecated public static final BuiltinMacs hmacmd5
@Deprecated public static final BuiltinMacs hmacmd596
public static final BuiltinMacs hmacsha1
public static final BuiltinMacs hmacsha1etm
@Deprecated public static final BuiltinMacs hmacsha196
public static final BuiltinMacs hmacsha256
public static final BuiltinMacs hmacsha256etm
public static final BuiltinMacs hmacsha512
public static final BuiltinMacs hmacsha512etm
public static final Set<BuiltinMacs> VALUES
public static BuiltinMacs[] values()
for (BuiltinMacs c : BuiltinMacs.values()) System.out.println(c);
public static BuiltinMacs 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 NamedResourcepublic final String getAlgorithm()
getAlgorithm in interface AlgorithmNameProviderpublic final int getBlockSize()
getBlockSize in interface MacInformationpublic final int getDefaultBlockSize()
getDefaultBlockSize in interface MacInformationpublic final boolean isSupported()
isSupported in interface OptionalFeaturepublic final String toString()
toString in class Enum<BuiltinMacs>public static void registerExtension(MacFactory 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 NavigableSet<MacFactory> getRegisteredExtensions()
NavigableSet of the currently registered extensions, sorted according to the factory name (case
insensitive)public static MacFactory unregisterExtension(String name)
name - The factory name - ignored if null/emptynull if not foundpublic static BuiltinMacs fromString(String s)
s - The Enum's name - ignored if null/emptyBuiltinMacs whose Enum.name() matches (case
insensitive) the provided argument - null if no matchpublic static BuiltinMacs fromFactory(NamedFactory<Mac> factory)
factory - The NamedFactory for the MAC - ignored if nullBuiltinMacs whose factory name matches (case
insensitive) the digest factory namefromFactoryName(String)public static BuiltinMacs fromFactoryName(String name)
name - The factory name - ignored if null/emptyBuiltinMacs whose factory name matches (case insensitive) the provided
name - null if no matchpublic static BuiltinMacs.ParseResult parseMacsList(String macs)
macs - A comma-separated list of MACs' names - ignored if null/emptyBuiltinMacs.ParseResult containing the successfully parsed factories and the unknown ones.
Note: it is up to caller to ensure that the lists do not contain duplicatespublic static BuiltinMacs.ParseResult parseMacsList(String... macs)
public static BuiltinMacs.ParseResult parseMacsList(Collection<String> macs)
public static MacFactory resolveFactory(String name)
name - The factory namenull if it is neither a built-in one or a registered extensionCopyright © 2018–2024 The Apache Software Foundation. All rights reserved.