Skip to content

Commit 858aa75

Browse files
committed
Revert to constants
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1744171 13f79535-47bb-0310-9956-ffa450edef68
1 parent f9d6655 commit 858aa75

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/org/apache/commons/codec/digest/Sha2Crypt.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public static String sha256Crypt(final byte[] keyBytes, String salt) {
102102
if (salt == null) {
103103
salt = SHA256_PREFIX + B64.getRandomSalt(8);
104104
}
105-
return sha2Crypt(keyBytes, salt, SHA256_PREFIX, SHA256_BLOCKSIZE, MessageDigestAlgorithm.SHA_256.getName());
105+
return sha2Crypt(keyBytes, salt, SHA256_PREFIX, SHA256_BLOCKSIZE, MessageDigestAlgorithms.SHA_256);
106106
}
107107

108108
/**
@@ -540,6 +540,6 @@ public static String sha512Crypt(final byte[] keyBytes, String salt) {
540540
if (salt == null) {
541541
salt = SHA512_PREFIX + B64.getRandomSalt(8);
542542
}
543-
return sha2Crypt(keyBytes, salt, SHA512_PREFIX, SHA512_BLOCKSIZE, MessageDigestAlgorithm.SHA_512.getName());
543+
return sha2Crypt(keyBytes, salt, SHA512_PREFIX, SHA512_BLOCKSIZE, MessageDigestAlgorithms.SHA_512);
544544
}
545545
}

0 commit comments

Comments
 (0)