Class GordianSymCipherSpec
java.lang.Object
io.github.tonywasher.joceanus.gordianknot.api.cipher.GordianCipherSpec<GordianSymKeySpec>
io.github.tonywasher.joceanus.gordianknot.api.cipher.GordianSymCipherSpec
- All Implemented Interfaces:
GordianIdSpec
The SymCipherSpec class.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGordianSymCipherSpec(GordianSymKeySpec pKeySpec, GordianCipherMode pMode, GordianPadding pPadding) Constructor. -
Method Summary
Methods inherited from class io.github.tonywasher.joceanus.gordianknot.api.cipher.GordianCipherSpec
getKeyType
-
Field Details
-
AADIVLEN
public static final int AADIVLENThe IV length.- See Also:
-
-
Constructor Details
-
GordianSymCipherSpec
public GordianSymCipherSpec(GordianSymKeySpec pKeySpec, GordianCipherMode pMode, GordianPadding pPadding) Constructor.- Parameters:
pKeySpec- the keySpecpMode- the modepPadding- the padding
-
-
Method Details
-
getCipherMode
Obtain the cipherMode.- Returns:
- the mode
-
getPadding
Obtain the padding.- Returns:
- the padding
-
isValid
public boolean isValid()Description copied from class:GordianCipherSpecIs the keySpec valid?- Specified by:
isValidin classGordianCipherSpec<GordianSymKeySpec>- Returns:
- true/false.
-
needsIV
public boolean needsIV()Description copied from class:GordianCipherSpecObtain the cipherMode.- Specified by:
needsIVin classGordianCipherSpec<GordianSymKeySpec>- Returns:
- the mode
-
getBlockLength
Obtain the blockLength.- Returns:
- the blockLength
-
getIVLength
public int getIVLength()Description copied from class:GordianCipherSpecObtain the IV length for the cipher.- Specified by:
getIVLengthin classGordianCipherSpec<GordianSymKeySpec>- Returns:
- the IV length
-
isAAD
public boolean isAAD()Is this an AAD mode?- Returns:
- true/false
-
toString
- Overrides:
toStringin classGordianCipherSpec<GordianSymKeySpec>
-
equals
- Overrides:
equalsin classGordianCipherSpec<GordianSymKeySpec>
-
hashCode
public int hashCode()- Overrides:
hashCodein classGordianCipherSpec<GordianSymKeySpec>
-