public enum EMacAlgorithm extends Enum<EMacAlgorithm>
| Enum Constant and Description |
|---|
HMAC_MD5 |
HMAC_SHA1 |
HMAC_SHA224 |
HMAC_SHA256 |
HMAC_SHA384 |
HMAC_SHA512 |
| Modifier and Type | Method and Description |
|---|---|
Mac |
createMac() |
Mac |
createMac(Provider aSecurityProvider) |
SecretKeySpec |
createSecretKey(byte[] aKey)
Create a new
SecretKeySpec with this algorithm and the provided key
bytes. |
String |
getAlgorithm() |
static EMacAlgorithm |
getFromStringIgnoreCase(String sAlgorithm) |
static EMacAlgorithm |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EMacAlgorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EMacAlgorithm HMAC_MD5
public static final EMacAlgorithm HMAC_SHA1
public static final EMacAlgorithm HMAC_SHA224
public static final EMacAlgorithm HMAC_SHA256
public static final EMacAlgorithm HMAC_SHA384
public static final EMacAlgorithm HMAC_SHA512
public static EMacAlgorithm[] values()
for (EMacAlgorithm c : EMacAlgorithm.values()) System.out.println(c);
public static EMacAlgorithm 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 null@Nonnull @Nonempty public String getAlgorithm()
null nor empty.@Nonnull public Mac createMac()
IllegalStateException - If this algorithm is not supported by this Java runtime.@Nonnull public Mac createMac(@Nullable Provider aSecurityProvider)
aSecurityProvider - The security provider to use. May be null to use the
default security provider.IllegalStateException - If this algorithm is not supported by this Java runtime.@Nonnull public SecretKeySpec createSecretKey(@Nonnull byte[] aKey)
SecretKeySpec with this algorithm and the provided key
bytes.aKey - The key bytes to use. May not be null.SecretKeySpec.@Nullable public static EMacAlgorithm getFromStringIgnoreCase(@Nullable String sAlgorithm)
Copyright © 2016–2019 Philip Helger. All rights reserved.