Package moe.kyokobot.libdave
Enum Class EncryptorResultCode
- All Implemented Interfaces:
Serializable,Comparable<EncryptorResultCode>,Constable
Result codes for
Encryptor.encrypt(moe.kyokobot.libdave.MediaType, int, byte[], byte[]) operations.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEncryption failed (generic error).Encryption failed because the underlying cryptor was missing or invalid.Encryption failed because the key ratchet for the stream is missing.Encryption was successful.Encryption failed due to too many attempts to encrypt the frame. -
Method Summary
Modifier and TypeMethodDescriptionstatic EncryptorResultCodefromValue(int value) Retrieves the EncryptorResultCode enum from its integer value.intgetValue()Gets the integer value of the result code.static EncryptorResultCodeReturns the enum constant of this class with the specified name.static EncryptorResultCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
Encryption was successful. -
ENCRYPTION_FAILURE
Encryption failed (generic error). -
MISSING_KEY_RATCHET
Encryption failed because the key ratchet for the stream is missing. -
MISSING_CRYPTOR
Encryption failed because the underlying cryptor was missing or invalid. -
TOO_MANY_ATTEMPTS
Encryption failed due to too many attempts to encrypt the frame.
-
-
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
-
getValue
public int getValue()Gets the integer value of the result code.- Returns:
- The result code value.
-
fromValue
Retrieves the EncryptorResultCode enum from its integer value.- Parameters:
value- The integer value.- Returns:
- The corresponding
EncryptorResultCode. - Throws:
IllegalArgumentException- if the value is unknown.
-