java.lang.Object
java.lang.Enum<GordianCipherMode>
io.github.tonywasher.joceanus.gordianknot.api.cipher.GordianCipherMode
All Implemented Interfaces:
Serializable, Comparable<GordianCipherMode>, Constable

public enum GordianCipherMode extends Enum<GordianCipherMode>
Cipher Modes. Available algorithms.
  • Enum Constant Details

  • Method Details

    • values

      public static GordianCipherMode[] 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 GordianCipherMode 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
    • hasPadding

      public boolean hasPadding()
      Does the mode require padding?
      Returns:
      true/false
    • isAAD

      public boolean isAAD()
      Is this an AAD mode?
      Returns:
      true/false
    • allowShortBlock

      public boolean allowShortBlock()
      Can we work on a short block?
      Returns:
      true/false
    • needsStdBlock

      public boolean needsStdBlock()
      Does the mode require a standard block?
      Returns:
      true/false
    • validForSymKey

      public boolean validForSymKey(GordianSymKeySpec pKeySpec)
      Is this mode valid for the symKeySpec?
      Parameters:
      pKeySpec - the keySpec
      Returns:
      true/false
    • needsIV

      public boolean needsIV()
      Does the mode need an IV?
      Returns:
      true/false
    • needsReInitialisation

      public boolean needsReInitialisation()
      Needs re-initialisation after final.
      Returns:
      true/false