Package org.jasypt.iv
Class NoIvGenerator
Object
org.jasypt.iv.NoIvGenerator
- All Implemented Interfaces:
IvGenerator
This implementation of IvGenerator
always returns a
initialization vector (IV) of length 0.
This class is thread-safe.
- Since:
- 1.9.3
- Author:
- Hoki Torres
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
generateIv
(int lengthBytes) Return IV with 0 byte length.boolean
As this IV generator provides an empty vector, its inclusion unencrypted in encryption results is not necessary.
-
Constructor Details
-
NoIvGenerator
public NoIvGenerator()Creates a new instance of NoIvGenerator
-
-
Method Details
-
generateIv
public byte[] generateIv(int lengthBytes) Return IV with 0 byte length.- Specified by:
generateIv
in interfaceIvGenerator
- Parameters:
lengthBytes
- length in bytes.- Returns:
- the generated IV.
-
includePlainIvInEncryptionResults
public boolean includePlainIvInEncryptionResults()As this IV generator provides an empty vector, its inclusion unencrypted in encryption results is not necessary.- Specified by:
includePlainIvInEncryptionResults
in interfaceIvGenerator
- Returns:
- false
-