Package com.trilead.ssh2.crypto.digest
Enum MessageMac.Hmac
- java.lang.Object
-
- java.lang.Enum<MessageMac.Hmac>
-
- com.trilead.ssh2.crypto.digest.MessageMac.Hmac
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MessageMac.Hmac>
- Enclosing class:
- MessageMac
private static enum MessageMac.Hmac extends java.lang.Enum<MessageMac.Hmac>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HMAC_MD5
HMAC_MD5_96
HMAC_SHA1
HMAC_SHA1_96
HMAC_SHA2_256
HMAC_SHA2_512
-
Constructor Summary
Constructors Modifier Constructor Description private
Hmac(java.lang.String type, java.lang.String algorithm, int length)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAlgorithm()
private static MessageMac.Hmac
getHmac(java.lang.String type)
int
getLength()
java.lang.String
getType()
static MessageMac.Hmac
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MessageMac.Hmac[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
HMAC_MD5_96
public static final MessageMac.Hmac HMAC_MD5_96
-
HMAC_MD5
public static final MessageMac.Hmac HMAC_MD5
-
HMAC_SHA1_96
public static final MessageMac.Hmac HMAC_SHA1_96
-
HMAC_SHA1
public static final MessageMac.Hmac HMAC_SHA1
-
HMAC_SHA2_256
public static final MessageMac.Hmac HMAC_SHA2_256
-
HMAC_SHA2_512
public static final MessageMac.Hmac HMAC_SHA2_512
-
-
Method Detail
-
values
public static MessageMac.Hmac[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MessageMac.Hmac c : MessageMac.Hmac.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MessageMac.Hmac valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getType
public java.lang.String getType()
-
getAlgorithm
public java.lang.String getAlgorithm()
-
getLength
public int getLength()
-
getHmac
private static MessageMac.Hmac getHmac(java.lang.String type)
-
-