org.whispersystems.curve25519.JCESecureRandomProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of curve25519-java Show documentation
Show all versions of curve25519-java Show documentation
Curve25519 library for Java
package org.whispersystems.curve25519;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
public class JCESecureRandomProvider implements SecureRandomProvider {
@Override
public void nextBytes(byte[] output) {
try {
SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG");
secureRandom.nextBytes(output);
} catch (NoSuchAlgorithmException e) {
throw new AssertionError(e);
}
}
}