core: make newSecureRandom() a one-liner

This commit is contained in:
Andras Slemmer 2016-06-17 13:06:58 +01:00
parent ba96282591
commit ea7f9177d4

View File

@ -10,9 +10,7 @@ import java.security.*
import java.security.interfaces.ECPublicKey
import net.i2p.crypto.eddsa.KeyPairGenerator as EddsaKeyPairGenerator
fun newSecureRandom(): SecureRandom {
return SecureRandom.getInstance("NativePRNGNonBlocking")
}
fun newSecureRandom() = 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) {