Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Crypto Java API Reference 10g Release 3 (10.1.3) B25378-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.crypto.core
Class RC2AlgorithmIdentifier

`java.lang.Object
oracle.security.crypto.core.AlgorithmIdentifier
oracle.security.crypto.core.RC2AlgorithmIdentifier`

All Implemented Interfaces:
  ASN1Object, java.lang.Cloneable, 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`

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, toString`

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.

### 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 object comes
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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Crypto Java API Reference 10g Release 3 (10.1.3) B25378-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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