You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/03/04 21:07:33 UTC

[GitHub] [nifi] alopresto commented on a change in pull request #4111: NIFI-7119 Implement boundary checking for Argon2 cost parameters

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_r387934796
 
 

 ##########
 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:
   Should be `int` rather than `double`. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services