Skip to content

Commit 2e11d10

Browse files
committed
Slight tweak to CryptoUtils
1 parent d87e229 commit 2e11d10

File tree

1 file changed

+2
-2
lines changed
  • org.archicontribs.modelrepository/src/org/archicontribs/modelrepository/authentication

1 file changed

+2
-2
lines changed

org.archicontribs.modelrepository/src/org/archicontribs/modelrepository/authentication/CryptoUtils.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public static SecretKey generateRandomSecretKey() throws NoSuchAlgorithmExceptio
132132
*/
133133
public static SecretKey generateKeyFromPassword(String algorithm, char[] password) throws GeneralSecurityException {
134134
// Convert the password bytes to Base64 characters because PBEKey class will not accept non-Ascii characters in a password
135-
char[] encodedPassword = CryptoUtils.encodeCharsToBase64(password);
135+
char[] encodedPassword = encodeCharsToBase64(password);
136136

137137
PBEKeySpec keySpec = new PBEKeySpec(encodedPassword);
138138

@@ -153,7 +153,7 @@ public static SecretKey generateKeyFromPassword(String algorithm, char[] passwor
153153
*/
154154
public static SecretKey generateKeyFromPassword(String algorithm, char[] password, byte[] salt, int iterations) throws Exception {
155155
// Convert the password bytes to Base64 characters because PBEKey class will not accept non-Ascii characters in a password
156-
char[] encodedPassword = CryptoUtils.encodeCharsToBase64(password);
156+
char[] encodedPassword = encodeCharsToBase64(password);
157157

158158
PBEKeySpec pbeKeySpec = new PBEKeySpec(encodedPassword, salt, iterations, 256);
159159

0 commit comments

Comments
 (0)