public interface IVGenerator
Common interface for all IV generators which can be applied in digest or encryption operations.
Every implementation of this interface must be thread-safe.
| Modifier and Type | Method and Description |
|---|---|
byte[] |
generateIV(int length)
This method will be called for requesting the generation of a new
IV of the specified length.
|
boolean |
includePlainIVInEncryptionResults()
Determines if the digests and encrypted messages created with a
specific IV generator will include (prepended) the unencrypted
IV itself, so that it can be used for matching and decryption
operations.
|
byte[] generateIV(int length)
This method will be called for requesting the generation of a new IV of the specified length.
length - the requested length for the IV.boolean includePlainIVInEncryptionResults()
Determines if the digests and encrypted messages created with a specific IV generator will include (prepended) the unencrypted IV itself, so that it can be used for matching and decryption operations.
Generally, including the IV unencrypted in encryption results will be mandatory for randomly generated IVs, or for those generated in a non-predictable manner. Otherwise, digest matching and decryption operations will always fail.
Copyright © 2018 The JASYPT team. All rights reserved.