This is an automated email from the ASF dual-hosted git repository. solomax pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openmeetings.git
commit 976a75fd8c3def17f4600d71e467a966930f9915 Author: Maxim Solodovnik <solomax...@gmail.com> AuthorDate: Tue Feb 23 11:32:20 2021 +0700 [OPENMEETINGS-2520] sonar sould be more happy --- .../org/apache/openmeetings/util/crypt/SCryptImplementation.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openmeetings-util/src/main/java/org/apache/openmeetings/util/crypt/SCryptImplementation.java b/openmeetings-util/src/main/java/org/apache/openmeetings/util/crypt/SCryptImplementation.java index 34ba241..560d824 100644 --- a/openmeetings-util/src/main/java/org/apache/openmeetings/util/crypt/SCryptImplementation.java +++ b/openmeetings-util/src/main/java/org/apache/openmeetings/util/crypt/SCryptImplementation.java @@ -44,7 +44,7 @@ public class SCryptImplementation implements ICrypt { } return sr; }); - private static int COST = 1024 * 16; + private static int cost = 1024 * 16; private static final int KEY_LENGTH = 512; private static final int SALT_LENGTH = 200; @@ -58,14 +58,14 @@ public class SCryptImplementation implements ICrypt { try (final InputStream is = getClass().getResourceAsStream("/openmeetings.properties")) { Properties props = new Properties(); props.load(is); - COST = Integer.valueOf(props.getProperty("scrypt.cost", "" + COST)); + cost = Integer.valueOf(props.getProperty("scrypt.cost", "" + cost)); } catch (Exception e) { - log.error("Failed to initialize the COST", e); + log.error("Failed to initialize the cost", e); } } private static String hash(String str, byte[] salt) { - byte[] dk = SCrypt.generate(str.getBytes(UTF_8), salt, COST, 8, 8, KEY_LENGTH); + byte[] dk = SCrypt.generate(str.getBytes(UTF_8), salt, cost, 8, 8, KEY_LENGTH); return Base64.encodeBase64String(dk); }