Extend SecureRandomSpi
instead. Then either implement a Provider
or do a cheap SecureRandom
as
public MySecureRandom()
throws NoSuchAlgorithmException, NoSuchProviderException {
super(new MySecureRandom(),null);
}
(The implementation of next
relies on the given SPI)
Then pass your SecureRandom
as an argument to SSLContext.init
.