mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Java: add SHA384 to list of secure algorithms
This commit is contained in:
@@ -19,7 +19,7 @@ public class WeakHashing {
|
||||
|
||||
// BAD: Using a strong hashing algorithm but with a weak default
|
||||
MessageDigest bad3 = MessageDigest.getInstance(props.getProperty("hashAlg2", "MD5"));
|
||||
|
||||
|
||||
// GOOD: Using a strong hashing algorithm
|
||||
MessageDigest ok = MessageDigest.getInstance(props.getProperty("hashAlg2"));
|
||||
|
||||
@@ -28,5 +28,8 @@ public class WeakHashing {
|
||||
|
||||
// GOOD: Using a strong hashing algorithm
|
||||
MessageDigest ok3 = MessageDigest.getInstance("SHA3-512");
|
||||
|
||||
// GOOD: Using a strong hashing algorithm
|
||||
MessageDigest ok4 = MessageDigest.getInstance("SHA384");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user