Enum Class DecryptorResultCode

java.lang.Object
java.lang.Enum<DecryptorResultCode>
moe.kyokobot.libdave.DecryptorResultCode
All Implemented Interfaces:
Serializable, Comparable<DecryptorResultCode>, Constable

public enum DecryptorResultCode extends Enum<DecryptorResultCode>
  • Enum Constant Details

    • SUCCESS

      public static final DecryptorResultCode SUCCESS
      Decryption was successful.
    • DECRYPTION_FAILURE

      public static final DecryptorResultCode DECRYPTION_FAILURE
      Decryption failed (generic error).
    • MISSING_KEY_RATCHET

      public static final DecryptorResultCode MISSING_KEY_RATCHET
      Decryption failed because the key ratchet for the sender is missing.
    • INVALID_NONCE

      public static final DecryptorResultCode INVALID_NONCE
      Decryption failed due to an invalid nonce.
    • MISSING_CRYPTOR

      public static final DecryptorResultCode MISSING_CRYPTOR
      Decryption failed because the underlying cryptor was missing or invalid.
  • Method Details

    • values

      public static DecryptorResultCode[] 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

      public static DecryptorResultCode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Gets the integer value of the result code.
      Returns:
      The result code value.
    • fromValue

      public static DecryptorResultCode fromValue(int value)
      Retrieves the DecryptorResultCode enum from its integer value.
      Parameters:
      value - The integer value.
      Returns:
      The corresponding DecryptorResultCode.
      Throws:
      IllegalArgumentException - if the value is unknown.