Skip navigation links

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

E10668-05


oracle.security.crypto.core
Class CBCAlgorithmIdentifier

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

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

public class CBCAlgorithmIdentifier
extends AlgorithmIdentifier

An algorithm identifier for Cipher Block Chaining (CBC) mode symmetric block ciphers, which use an initialization vector as a parameter.

Since:
2.1
See Also:
AES, DES, DES_EDE, Blowfish, Serialized Form

Constructor Summary
CBCAlgorithmIdentifier()
          Creates a new empty instance.
CBCAlgorithmIdentifier(AlgorithmIdentifier algID, byte[] iv)
          Create a new CBCAlgorithmIdentifier using the OID from the given algorithm identifier and initialization vector.
CBCAlgorithmIdentifier(ASN1ObjectID oid, ASN1Object params)
          Create a new CBCAlgorithmIdentifier using the given OID, and obtaining the initialization vector by decoding the given ASN1Object.
CBCAlgorithmIdentifier(ASN1ObjectID oid, byte[] iv)
          Create a new CBCAlgorithmIdentifier using the given OID and initialization vector.
CBCAlgorithmIdentifier(java.io.InputStream is)
          Makes a new instance by reading its encoding from the given InputStream.

 

Method Summary
 java.lang.Object clone()
          Creates a deep clone of this CBCAlgorithmIdentifier object.
 byte[] getIV()
          Returns the bytes of the initialization vector.
 void input(java.io.InputStream is)
          Reads in a CBCAlgorithmIdentifier 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

CBCAlgorithmIdentifier

public CBCAlgorithmIdentifier()
Creates a new empty instance. This constructor is to be used with serialization or with the input method.

CBCAlgorithmIdentifier

public CBCAlgorithmIdentifier(ASN1ObjectID oid,
                              ASN1Object params)
                       throws AlgorithmIdentifierException
Create a new CBCAlgorithmIdentifier using the given OID, and obtaining the initialization vector by decoding the given ASN1Object.
Parameters:
oid - The object identifier for the cipher algorithm.
params - An ASN1Object containing the encoding of the bytes of the initialization vector.
Throws:
AlgorithmIdentifierException

CBCAlgorithmIdentifier

public CBCAlgorithmIdentifier(ASN1ObjectID oid,
                              byte[] iv)
Create a new CBCAlgorithmIdentifier using the given OID and initialization vector.
Parameters:
oid - The object identifier for the cipher algorithm.
iv - The bytes of the initialization vector.

CBCAlgorithmIdentifier

public CBCAlgorithmIdentifier(AlgorithmIdentifier algID,
                              byte[] iv)
Create a new CBCAlgorithmIdentifier using the OID from the given algorithm identifier and initialization vector.
Parameters:
algID - The algorithm identifier from which to obtain the object identifier for the cipher algorithm.
iv - The bytes of the initialization vector.

CBCAlgorithmIdentifier

public CBCAlgorithmIdentifier(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 CBCAlgorithmIdentifier object will be read.
Throws:
java.io.IOException - If an input exception occurs reading the algorithm identifier from the stream.

Method Detail

getIV

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

clone

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

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Reads in a CBCAlgorithmIdentifier 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 Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10668-05


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