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:
Andy LoPresto 2015-12-02 15:20:46 -08:00 committed by Aldrin Piri
parent 69598a0b40
commit bde270a911
1 changed files with 1 additions and 2 deletions

View File

@ -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) {