javax.crypto.spec
Class IvParameterSpec
java.lang.Object
|
+--javax.crypto.spec.IvParameterSpec
- public class IvParameterSpec
- extends java.lang.Object
- implements AlgorithmParameterSpec
Initialization vector (IV) specification.
Attention: This is not a SUN implementation!
This class has been developed by IAIK according to the documentation publically available.
For SUNīs documentation of this class see
http://java.sun.com/security/JCE1.2/spec/apidoc/index.html
This class represents an initialization vector (IV) for being used by any algorithm that needs
an Iv, e.g. when running a DES, TripleDES, IDEA,... cipher in CBC, PCBC, CFB or OFB mode.
- See Also:
AlgorithmParameterSpec
|
Constructor Summary |
IvParameterSpec(byte[] iv)
Creates a IvParameterSpec from the given byte array. |
IvParameterSpec(byte[] iv,
int offset,
int len)
Creates an IvParameterSpec by using the given number of bytes of the supplied
byte array as IV, beginning at the given offset. |
|
Method Summary |
byte[] |
getIV()
Returns a copy of the initialization vector (IV) as byte array representation. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
IvParameterSpec
public IvParameterSpec(byte[] iv)
- Creates a IvParameterSpec from the given byte array.
- Parameters:
iv - the byte array holding the IV
IvParameterSpec
public IvParameterSpec(byte[] iv,
int offset,
int len)
- Creates an IvParameterSpec by using the given number of bytes of the supplied
byte array as IV, beginning at the given offset.
- Parameters:
iv - the byte array holding the IVoffset - the offset indicating the start position within the input IV byte arraylen - the number bytes to be taken for the IV
getIV
public byte[] getIV()
- Returns a copy of the initialization vector (IV) as byte array representation.
- Returns:
- a copy of the initialization vector (IV) as byte array representation