public class RC2AlgorithmIdentifier extends AlgorithmIdentifier
If an effective key length is not specified, the default will be 0 which has the the meaning of "no effective key length specified".
RC2, Serialized Form| Constructor and Description |
|---|
RC2AlgorithmIdentifier(ASN1ObjectID oid, ASN1Object params)
Create a new
RC2AlgorithmIdentifier using the given OID, and obtaining the initialization vector and effective key length by decoding the given ASN1Object. |
RC2AlgorithmIdentifier(byte[] iv, int effectiveKeyLength)
Create a new
RC2AlgorithmIdentifier using the given initialization vector and effective key length. |
RC2AlgorithmIdentifier(java.io.InputStream is)
Makes a new instance by reading its encoding from the given InputStream.
|
RC2AlgorithmIdentifier(int effectiveKeyLength)
Create a new
RC2AlgorithmIdentifier using the given effective key length. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a deep copy of this
RC2AlgorithmIdentifier object. |
int |
getEffectiveKeyLength()
Returns the effective key length, in bits.
|
byte[] |
getIV()
Returns the bytes of the initialization vector.
|
void |
input(java.io.InputStream is)
Reads in a
RC2AlgorithmIdentifier object from the given input stream. |
equals, getOID, getParameters, hashCode, length, output, readExternal, toString, writeExternalpublic RC2AlgorithmIdentifier(ASN1ObjectID oid, ASN1Object params) throws AlgorithmIdentifierException
RC2AlgorithmIdentifier using the given OID, and obtaining the initialization vector and effective key length by decoding the given ASN1Object.oid - The object identifier for the cipher algorithm, which must be equal to the OID from AlgID.RC2_CBC.params - An ASN1Object containing the encoding of the parameters.AlgorithmIdentifierException
public RC2AlgorithmIdentifier(byte[] iv,
int effectiveKeyLength)
RC2AlgorithmIdentifier using the given initialization vector and effective key length.iv - The bytes of the initialization vector.effectiveKeyLength - The effective key length, in bits.public RC2AlgorithmIdentifier(int effectiveKeyLength)
RC2AlgorithmIdentifier using the given effective key length. The initialization vector is set to null.effectiveKeyLength - The effective key length, in bits.
public RC2AlgorithmIdentifier(java.io.InputStream is)
throws java.io.IOException
is - The InputStream from which the RC2AlgorithmIdentifier will be read.java.io.IOException - If an input exception occured.public byte[] getIV()
public int getEffectiveKeyLength()
public java.lang.Object clone()
RC2AlgorithmIdentifier object.clone in class AlgorithmIdentifier
public void input(java.io.InputStream is)
throws java.io.IOException
RC2AlgorithmIdentifier object from the given input stream.input in interface Streamableinput in class AlgorithmIdentifieris - The input stream.java.io.IOException - If an I/O error occurs.