mirror of https://github.com/apache/nifi.git
NIFI-1240:
Added explicit reference to Sun Java Cryptographic Service Provider in PasswordBasedEncryptor. Removed manual seeding of SecureRandom in PasswordBasedEncryptor. This closes #138. Signed-off-by: Aldrin Piri <aldrin@apache.org>
This commit is contained in:
parent
69598a0b40
commit
bde270a911
|
@ -65,8 +65,7 @@ public class PasswordBasedEncryptor implements Encryptor {
|
|||
public StreamCallback getEncryptionCallback() throws ProcessException {
|
||||
try {
|
||||
byte[] salt = new byte[saltSize];
|
||||
SecureRandom secureRandom = SecureRandom.getInstance(SECURE_RANDOM_ALGORITHM);
|
||||
secureRandom.setSeed(System.currentTimeMillis());
|
||||
SecureRandom secureRandom = SecureRandom.getInstance(SECURE_RANDOM_ALGORITHM, "SUN");
|
||||
secureRandom.nextBytes(salt);
|
||||
return new EncryptCallback(salt);
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Reference in New Issue