mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-04 13:49:13 +01:00
fix wrong key usage during encoding in DefaultCipherHandler, see issue #887
This commit is contained in:
@@ -251,7 +251,7 @@ public class DefaultCipherHandler implements CipherHandler
|
||||
random.nextBytes(salt);
|
||||
|
||||
IvParameterSpec iv = new IvParameterSpec(salt);
|
||||
SecretKey secretKey = buildSecretKey(key);
|
||||
SecretKey secretKey = buildSecretKey(plainKey);
|
||||
javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance(CIPHER_TYPE);
|
||||
|
||||
cipher.init(javax.crypto.Cipher.ENCRYPT_MODE, secretKey, iv);
|
||||
|
||||
Reference in New Issue
Block a user