Enum Class WfEncryptionMethod
- All Implemented Interfaces:
Serializable
,Comparable<WfEncryptionMethod>
,Constable
Whiteflag encryption parameters enum class
This is a non-instantiatable enum class that holds all encryption parameters in accordance with the Whiteflag specification. No implementation specific properties and methods are defined by this class.
The names of cryptographic algorithms, modes, schemes used by this class are in accordance with the Java Security Standard Algorithm Names.
- 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
Enum ConstantDescriptionEncryption Method 1: AES-256-CTR with negotiated keyEncryption Method : AES-256-CTR with pre-shared keyEncryption Method 0: no encryption -
Field Summary
Modifier and TypeFieldDescriptionprotected final String
The name of the algorithm for this encryption method, i.a.w.final String
The cipher name for this encryption method i.a.w.final String
The value used in a Whiteflag message to indicate the encryption methodprotected final byte[]
The salt used by this encryption method in the HKDF function to derive the encryption keyprotected final int
The byte length of the encryption key for this encryption methodprotected final String
The mode of operation for this encryption method, i.a.w.protected final String
The padding scheme for this encryption method, i.a.w. -
Method Summary
Modifier and TypeMethodDescriptionstatic final WfEncryptionMethod
fromFieldValue
(String fieldValue) Returns the encryption method from the indicator valuestatic WfEncryptionMethod
Returns the enum constant of this class with the specified name.static WfEncryptionMethod[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_ENCRYPTION
Encryption Method 0: no encryption -
AES_256_CTR_ECDH
Encryption Method 1: AES-256-CTR with negotiated key -
AES_256_CTR_PSK
Encryption Method : AES-256-CTR with pre-shared key
-
-
Field Details
-
fieldValue
The value used in a Whiteflag message to indicate the encryption method -
algorithmName
The name of the algorithm for this encryption method, i.a.w. Java Security Standard Algorithm Names -
operationMode
The mode of operation for this encryption method, i.a.w. Java Security Standard Algorithm Names -
paddingScheme
The padding scheme for this encryption method, i.a.w. Java Security Standard Algorithm Names -
cipherName
The cipher name for this encryption method i.a.w. Java Security Standard Algorithm Names -
keyLength
protected final int keyLengthThe byte length of the encryption key for this encryption method -
hkdfSalt
protected final byte[] hkdfSaltThe salt used by this encryption method in the HKDF function to derive the encryption key
-
-
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 EncryptionIndicator message field to indicate the encryption method- Returns:
- the requested encryption method
- Throws:
WfCryptoException
- if the encryption indicator is invalid- Since:
- 1.1
-