Enum Class WfAuthMethod
- All Implemented Interfaces:
Serializable
,Comparable<WfAuthMethod>
,Constable
Whiteflag authentication parameters enum class
This is a non-instantiatable enum class that holds all authentication parameters in accordance with the Whiteflag specification. No implementation specific properties and methods are defined by this class.
- Since:
- 1.1
- Whiteflag version:
- v1-draft.6
- Whiteflag standard x-reference:
- 5.2.3 Key and Token Derivation
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionfinal String
The indicator used in the VerificationMethod message field for this authentication methodprotected final byte[]
The salt used by this authentication method in the HKDF function to derive the validation dataprotected final int
The byte length of the validation token for this authentication method -
Method Summary
Modifier and TypeMethodDescriptionstatic final WfAuthMethod
fromFieldValue
(String fieldValue) Returns the encryption method from the indicator valuestatic WfAuthMethod
Returns the enum constant of this class with the specified name.static WfAuthMethod[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TOKEN_PRESHARED
Authentication Method 2: shared token
-
-
Field Details
-
fieldValue
The indicator used in the VerificationMethod message field for this authentication method -
tokenLength
protected final int tokenLengthThe byte length of the validation token for this authentication method -
hkdfSalt
protected final byte[] hkdfSaltThe salt used by this authentication method in the HKDF function to derive the validation data
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromFieldValue
Returns the encryption method from the indicator value- Parameters:
fieldValue
- the value used in the VerificationMethod message field to indicate the encryption method- Returns:
- the requested authentication method
- Throws:
WfCryptoException
- if the encryption indicator is invalid- Since:
- 1.1
-