Package moe.kyokobot.libdave
Enum Class DecryptorResultCode
- All Implemented Interfaces:
Serializable,Comparable<DecryptorResultCode>,Constable
Result codes for
Decryptor.decrypt(moe.kyokobot.libdave.MediaType, 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 ConstantDescriptionDecryption failed (generic error).Decryption failed due to an invalid nonce.Decryption failed because the underlying cryptor was missing or invalid.Decryption failed because the key ratchet for the sender is missing.Decryption was successful. -
Method Summary
Modifier and TypeMethodDescriptionstatic DecryptorResultCodefromValue(int value) Retrieves the DecryptorResultCode enum from its integer value.intgetValue()Gets the integer value of the result code.static DecryptorResultCodeReturns the enum constant of this class with the specified name.static DecryptorResultCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
Decryption was successful. -
DECRYPTION_FAILURE
Decryption failed (generic error). -
MISSING_KEY_RATCHET
Decryption failed because the key ratchet for the sender is missing. -
INVALID_NONCE
Decryption failed due to an invalid nonce. -
MISSING_CRYPTOR
Decryption failed because the underlying cryptor was missing or invalid.
-
-
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 DecryptorResultCode enum from its integer value.- Parameters:
value- The integer value.- Returns:
- The corresponding
DecryptorResultCode. - Throws:
IllegalArgumentException- if the value is unknown.
-