|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SaltGenerator
Common interface for all salt generators which can be applied in digest or encryption operations.
Every implementation of this interface must be thread-safe.
Method Summary | |
---|---|
byte[] |
generateSalt(int lengthBytes)
This method will be called for requesting the generation of a new salt of the specified length. |
boolean |
includePlainSaltInEncryptionResults()
Determines if the digests and encrypted messages created with a specific salt generator will include (prepended) the unencrypted salt itself, so that it can be used for matching and decryption operations. |
Method Detail |
---|
byte[] generateSalt(int lengthBytes)
This method will be called for requesting the generation of a new salt of the specified length.
lengthBytes
- the requested length for the salt.
boolean includePlainSaltInEncryptionResults()
Determines if the digests and encrypted messages created with a specific salt generator will include (prepended) the unencrypted salt itself, so that it can be used for matching and decryption operations.
Generally, including the salt unencrypted in encryption results will be mandatory for randomly generated salts, or for those generated in a non-predictable manner. Otherwise, digest matching and decryption operations will always fail. For fixed salts, inclusion will be optional (and in fact undesirable if we want to hide the salt value).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |