This is an automated email from the ASF dual-hosted git repository.

jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 519472def9 ARTEMIS-5103 Remove hardcoded secure random algorithm from 
default codec
519472def9 is described below

commit 519472def9e76c7b3bdff3e0c958c6d30cec2bed
Author: Domenico Francesco Bruscino <[email protected]>
AuthorDate: Fri Oct 11 16:51:15 2024 +0200

    ARTEMIS-5103 Remove hardcoded secure random algorithm from default codec
---
 .../org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java
 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java
index 6a5b4caccd..9a9c756060 100644
--- 
a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java
+++ 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java
@@ -225,7 +225,6 @@ public class DefaultSensitiveStringCodec implements 
SensitiveDataCodec<String> {
    private static class PBKDF2Algorithm extends CodecAlgorithm {
       private static final String SEPARATOR = ":";
       private String sceretKeyAlgorithm = "PBKDF2WithHmacSHA1";
-      private String randomScheme = "SHA1PRNG";
       private int keyLength = 64 * 8;
       private int saltLength = 32;
       private int iterations = 1024;
@@ -236,7 +235,7 @@ public class DefaultSensitiveStringCodec implements 
SensitiveDataCodec<String> {
          super(params);
          skf = SecretKeyFactory.getInstance(sceretKeyAlgorithm);
          if (sr == null) {
-            sr = SecureRandom.getInstance(randomScheme);
+            sr = new SecureRandom();
          }
       }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to