From ecaeec53cefeed70254f1cf9b907c424b3b2587d Mon Sep 17 00:00:00 2001 From: RaftDev Date: Fri, 29 Mar 2024 13:49:27 +0100 Subject: [PATCH] Fixed bug where SecretKeyEncryptor#decrypt would use the encryptCipher. --- .../atlasworld/common/crypto/encryptor/SecretKeyEncryptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/src/main/java/fr/atlasworld/common/crypto/encryptor/SecretKeyEncryptor.java b/security/src/main/java/fr/atlasworld/common/crypto/encryptor/SecretKeyEncryptor.java index 41776b4..fdd78ee 100644 --- a/security/src/main/java/fr/atlasworld/common/crypto/encryptor/SecretKeyEncryptor.java +++ b/security/src/main/java/fr/atlasworld/common/crypto/encryptor/SecretKeyEncryptor.java @@ -54,7 +54,7 @@ public byte[] encrypt(byte[] bytes) throws IllegalBlockSizeException, BadPadding @Override public byte[] decrypt(byte[] bytes) throws IllegalBlockSizeException, BadPaddingException { - return this.encryptCipher.doFinal(bytes); + return this.decryptCipher.doFinal(bytes); } @Override