|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasypt.salt.FixedByteArraySaltGenerator
public class FixedByteArraySaltGenerator
This implementation of SaltGenerator always returns a fixed salt
set by the user.
If the requested salt has a size in bytes smaller than the specified salt, the first n bytes are returned. If it is larger, an exception is thrown.
This class is thread-safe.
| Constructor Summary | |
|---|---|
FixedByteArraySaltGenerator()
Creates a new instance of FixedByteArraySaltGenerator |
|
| Method Summary | |
|---|---|
byte[] |
generateSalt(int lengthBytes)
Return salt with the specified byte length. |
boolean |
includePlainSaltInEncryptionResults()
As this salt generator provides a fixed salt, its inclusion unencrypted in encryption results is not necessary, and in fact not desirable (so that it remains hidden). |
void |
setSalt(byte[] salt)
Sets the salt to be returned. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FixedByteArraySaltGenerator()
| Method Detail |
|---|
public void setSalt(byte[] salt)
salt - the specified salt.public byte[] generateSalt(int lengthBytes)
generateSalt in interface SaltGeneratorlengthBytes - length in bytes.
public boolean includePlainSaltInEncryptionResults()
includePlainSaltInEncryptionResults in interface SaltGenerator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||