|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.security.cipher.CAST128ParameterSpec
CAST parameter specification.
This class represents parameters for the CAST128 algorithm as specified by RFC 2144:
Parameters ::= SEQUENCE { iv OCTET STRING DEFAULT 0, -- Initialization vector keyLength INTEGER -- Key length, in bits }If no initialization vector is included it defaults to an IV of all zeros.
Constructor Summary | |
CAST128ParameterSpec(int keyLength)
Creates a CAST128ParametersSpec from the given keyLength value. |
|
CAST128ParameterSpec(int keyLength,
byte[] initVector)
Creates a CAST128ParametersSpec by using the first 8 bytes of the supplied byte array as initialization vector (IV). |
|
CAST128ParameterSpec(int keyLength,
byte[] initVector,
int offset)
Creates a CAST128ParametersSpec by using 8 bytes of the supplied byte array as IV, beginning at the given offset. |
Method Summary | |
byte[] |
getIV()
Returns a copy of the initialization vector (IV) as byte array representation. |
int |
getKeyLength()
Return the key length. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CAST128ParameterSpec(int keyLength)
keyLength
- the key lengthpublic CAST128ParameterSpec(int keyLength, byte[] initVector)
keyLength
- the key lengthinitVector
- the byte array holding the IVpublic CAST128ParameterSpec(int keyLength, byte[] initVector, int offset)
keyLength
- the key lengthinitVector
- the byte array holding the IVoffset
- the offset indicating the start position within the input IV byte arrayMethod Detail |
public int getKeyLength()
public byte[] getIV()
If no initialization vector has been set, a default iv off all zeros is returned as required by RFC 2144.
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |