public class ByteArrayFixedIvGenerator extends Object implements FixedIvGenerator
Byte-array based implementation of
FixedIvGenerator, that will
always return the same initialization vector (IV).
If the requested IV has a size in bytes smaller than the specified IV, the first n bytes are returned. If it is larger, an exception is thrown.
This class is thread-safe.
|Constructor and Description|
Creates a new instance of FixedByteArrayIvGenerator
|Modifier and Type||Method and Description|
Return iv with the specified byte length.
As this iv generator provides a fixed iv, its inclusion unencrypted in encryption results is not necessary, and in fact not desirable (so that it remains hidden).
public ByteArrayFixedIvGenerator(byte iv)
iv- the specified iv.
public byte generateIv(int lengthBytes)
public boolean includePlainIvInEncryptionResults()
Copyright © 2021 JBoss by Red Hat. All rights reserved.