All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface java.security.FeedbackCipher

public interface FeedbackCipher
ATTENTION:

This is NOT the implementation from Sun. This class has been developed by IAIK according to the documentation publically available. Only the documentation from Sun has been inserted into the source files.


An interface implemented by algorithms that use feedback. Examples include block ciphers in CBC, CFB, or OFB mode.

This interface is used to set or get the initialization vector, which is the data first used as feedback.

Note that initialization vectors are not secret, and should not be used for data (such as cipher keys) where secrecy is required.


Method Index

 o decrypt(byte[], int, int, byte[], int)
 o encrypt(byte[], int, int, byte[], int)
 o getInitializationVector()
Gets the initialization vector for this object.
 o getInitializationVectorLength()
Returns the size of the initialization vector expected by setInitializationVector.
 o getName()
 o setInitializationVector(byte[])
Sets the initialization vector for this object.

Methods

 o setInitializationVector
 public abstract void setInitializationVector(byte iv[])
Sets the initialization vector for this object. Note that FeedbackCiphers will usually default to a randomly generated vector if none is provided.

This method may only be called on an uninitialized cipher (one in the UNINITIALIZED state) that implements FeedbackCipher.

Parameters:
iv - - the initialization vector.
Throws: InvalidParameterException
if the initialization vector is of the wrong length or otherwise invalid.
 o getInitializationVector
 public abstract byte[] getInitializationVector()
Gets the initialization vector for this object. This may be called on a cipher implementing FeedbackCipher. It will return null if the initialization vector has not been set.

Returns:
the initialization vector for this cipher object.
 o getInitializationVectorLength
 public abstract int getInitializationVectorLength()
Returns the size of the initialization vector expected by setInitializationVector.

Returns:
the required size of the argument to setInitializationVector.
 o encrypt
 public abstract void encrypt(byte in[],
                              int inOff,
                              int inLen,
                              byte out[],
                              int outOff)
 o decrypt
 public abstract void decrypt(byte in[],
                              int inOff,
                              int inLen,
                              byte out[],
                              int outOff)
 o getName
 public abstract String getName()

All Packages  Class Hierarchy  This Package  Previous  Next  Index