Enum Class EncryptorResultCode

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

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

    • SUCCESS

      public static final EncryptorResultCode SUCCESS
      Encryption was successful.
    • ENCRYPTION_FAILURE

      public static final EncryptorResultCode ENCRYPTION_FAILURE
      Encryption failed (generic error).
    • MISSING_KEY_RATCHET

      public static final EncryptorResultCode MISSING_KEY_RATCHET
      Encryption failed because the key ratchet for the stream is missing.
    • MISSING_CRYPTOR

      public static final EncryptorResultCode MISSING_CRYPTOR
      Encryption failed because the underlying cryptor was missing or invalid.
    • TOO_MANY_ATTEMPTS

      public static final EncryptorResultCode TOO_MANY_ATTEMPTS
      Encryption failed due to too many attempts to encrypt the frame.
  • Method Details

    • values

      public static EncryptorResultCode[] 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 EncryptorResultCode 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 EncryptorResultCode fromValue(int value)
      Retrieves the EncryptorResultCode enum from its integer value.
      Parameters:
      value - The integer value.
      Returns:
      The corresponding EncryptorResultCode.
      Throws:
      IllegalArgumentException - if the value is unknown.