alopresto commented on a change in pull request #4111: NIFI-7119 Implement 
boundary checking for Argon2 cost parameters
URL: https://github.com/apache/nifi/pull/4111#discussion_r391314412
 
 

 ##########
 File path: 
nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/util/crypto/Argon2SecureHasher.java
 ##########
 @@ -53,11 +53,14 @@
     private final int iterations;
     private final int saltLength;
 
-    private final boolean usingStaticSalt;
+    private boolean usingStaticSalt;
 
     // A 16 byte salt (nonce) is recommended for password hashing
     private static final byte[] staticSalt = "NiFi Static 
Salt".getBytes(StandardCharsets.UTF_8);
 
+    // Upper boundary for several cost parameters
+    private static final double upperBoundary = Math.pow(2, 32) - 1;
 
 Review comment:
   Used `Integer` to hold unsigned ints. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to