java.lang.Object
io.github.tonywasher.joceanus.gordianknot.api.cipher.GordianCipherSpec<T>
Type Parameters:
T - the keyType
All Implemented Interfaces:
GordianIdSpec
Direct Known Subclasses:
GordianStreamCipherSpec, GordianSymCipherSpec

public abstract class GordianCipherSpec<T extends GordianKeySpec> extends Object implements GordianIdSpec
Cipher Specification.
  • Constructor Details

    • GordianCipherSpec

      GordianCipherSpec(T pKeyType)
      Constructor.
      Parameters:
      pKeyType - the keyType
  • Method Details

    • getKeyType

      public T getKeyType()
      Obtain the keyType.
      Returns:
      the keyType
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • needsIV

      public abstract boolean needsIV()
      Obtain the cipherMode.
      Returns:
      the mode
    • getIVLength

      public abstract int getIVLength()
      Obtain the IV length for the cipher.
      Returns:
      the IV length
    • isValid

      public abstract boolean isValid()
      Is the keySpec valid?
      Returns:
      true/false.
    • equals

      public boolean equals(Object pThat)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object