Skip navigation links

Oracle Fusion Middleware Crypto FIPS Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10696-03


oracle.security.crypto.core
Class RC2AlgorithmIdentifier

java.lang.Object
  extended by oracle.security.crypto.core.AlgorithmIdentifier
      extended by oracle.security.crypto.core.RC2AlgorithmIdentifier

All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, ASN1Object, Streamable

public class RC2AlgorithmIdentifier
extends AlgorithmIdentifier

An algorithm identifier for the RC2 symmetric cipher in CBC mode, which use an initialization vector and effective key length as parameters.

If an effective key length is not specified, the default will be 0 which has the the meaning of "no effective key length specified".

See Also:
RC2, Serialized Form

Constructor Summary
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.

 

Method Summary
 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.

 

Methods inherited from class oracle.security.crypto.core.AlgorithmIdentifier
equals, getOID, getParameters, hashCode, length, output, readExternal, toString, writeExternal

 

Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

 

Constructor Detail

RC2AlgorithmIdentifier

public RC2AlgorithmIdentifier(ASN1ObjectID oid,
                              ASN1Object params)
                       throws AlgorithmIdentifierException
Create a new RC2AlgorithmIdentifier using the given OID, and obtaining the initialization vector and effective key length by decoding the given ASN1Object.
Parameters:
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.
Throws:
AlgorithmIdentifierException

RC2AlgorithmIdentifier

public RC2AlgorithmIdentifier(byte[] iv,
                              int effectiveKeyLength)
Create a new RC2AlgorithmIdentifier using the given initialization vector and effective key length.
Parameters:
iv - The bytes of the initialization vector.
effectiveKeyLength - The effective key length, in bits.

RC2AlgorithmIdentifier

public RC2AlgorithmIdentifier(int effectiveKeyLength)
Create a new RC2AlgorithmIdentifier using the given effective key length. The initialization vector is set to null.
Parameters:
effectiveKeyLength - The effective key length, in bits.

RC2AlgorithmIdentifier

public RC2AlgorithmIdentifier(java.io.InputStream is)
                       throws java.io.IOException
Makes a new instance by reading its encoding from the given InputStream.
Parameters:
is - The InputStream from which the RC2AlgorithmIdentifier will be read.
Throws:
java.io.IOException - If an input exception occured.

Method Detail

getIV

public byte[] getIV()
Returns the bytes of the initialization vector.

getEffectiveKeyLength

public int getEffectiveKeyLength()
Returns the effective key length, in bits.

clone

public java.lang.Object clone()
Creates a deep copy of this RC2AlgorithmIdentifier object.
Overrides:
clone in class AlgorithmIdentifier

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Reads in a RC2AlgorithmIdentifier object from the given input stream.
Specified by:
input in interface Streamable
Overrides:
input in class AlgorithmIdentifier
Parameters:
is - The input stream.
Throws:
java.io.IOException - If an I/O error occurs.

Skip navigation links

Oracle Fusion Middleware Crypto FIPS Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10696-03


Copyright © 2005, 2011 , Oracle. All rights reserved.