HMAC_DRBG algorithm for Java SecureRandom: only possible in Java 9?

698 Views Asked by At

I tried running the codes below using Java 8:

final Set<String> algorithms = Security.getAlgorithms("SecureRandom");

for (String algorithm : algorithms) {
  System.out.println(algorithm);
}

final String defaultAlgorithm = new SecureRandom().getAlgorithm();

System.out.println("default: " + defaultAlgorithm);

I got the ff:

HASHDRBG
IBMSECURERANDOM
SHA1PRNG
SHA256DRBG
SHA512DRBG
default: SHA1PRNG

What if company policy states that we need to use HMAC_DRBG? is there a way to implement this in Java 8? I heard this could only be done in Java 9. is it true?

0

There are 0 best solutions below