public interface FeedbackCipher
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.
Modifier and Type | Method and Description |
---|---|
byte[] |
getInitializationVector()
Gets the initialization vector for this object.
|
int |
getInitializationVectorLength()
Returns the size of the initialization vector expected by
setInitializationVector . |
void |
setInitializationVector(byte[] iv)
Sets the initialization vector for this object.
|
void setInitializationVector(byte[] iv)
This method may only be called on an uninitialized cipher
(one in the UNINITIALIZED
state) that implements
FeedbackCipher.
iv
- the initialization vector.InvalidParameterException
- if the initialization vector
is of the wrong length or otherwise invalid.byte[] getInitializationVector()
null
if the initialization vector has not been set.int getInitializationVectorLength()
setInitializationVector
.setInitializationVector
.