public class ZeroSaltGenerator extends Object implements SaltGenerator
This implementation of SaltGenerator
always returns a salt
of the required length, filled with zero bytes.
This class is thread-safe.
Constructor and Description |
---|
ZeroSaltGenerator()
Creates a new instance of ZeroSaltGenerator
|
Modifier and Type | Method and Description |
---|---|
byte[] |
generateSalt(int lengthBytes)
Return salt with the specified byte length.
|
boolean |
includePlainSaltInEncryptionResults()
As this salt generator provides a predictable salt, its inclusion
unencrypted in encryption results
is not necessary, and in fact not desirable (so that it remains hidden).
|
public ZeroSaltGenerator()
public byte[] generateSalt(int lengthBytes)
generateSalt
in interface SaltGenerator
lengthBytes
- length in bytes.public boolean includePlainSaltInEncryptionResults()
includePlainSaltInEncryptionResults
in interface SaltGenerator
Copyright © 2017 JBoss by Red Hat. All rights reserved.