mirror of
https://github.com/corda/corda.git
synced 2024-12-22 14:22:28 +00:00
core: Add newSecureRandom() that uses a non-blocking SecureRandom provider
This commit is contained in:
parent
60d175da02
commit
6229e39b42
@ -10,6 +10,10 @@ import java.security.*
|
||||
import java.security.interfaces.ECPublicKey
|
||||
import net.i2p.crypto.eddsa.KeyPairGenerator as EddsaKeyPairGenerator
|
||||
|
||||
fun newSecureRandom(): SecureRandom {
|
||||
return SecureRandom.getInstance("NativePRNGNonBlocking")
|
||||
}
|
||||
|
||||
// "sealed" here means there can't be any subclasses other than the ones defined here.
|
||||
sealed class SecureHash private constructor(bits: ByteArray) : OpaqueBytes(bits) {
|
||||
class SHA256(bits: ByteArray) : SecureHash(bits) {
|
||||
|
Loading…
Reference in New Issue
Block a user