Do not instantiate SecureRandom on every call (#58)
This commit is contained in:
parent
735a71c9cd
commit
d55d9bd600
|
|
@ -24,6 +24,6 @@ object SecureRandomStringGenerator {
|
|||
}
|
||||
}
|
||||
|
||||
fun generateRandomBytes(size: Int) = ByteArray(size).also(SecureRandom()::nextBytes)
|
||||
fun generateRandomBytes(size: Int) = ByteArray(size).also(secureRandom::nextBytes)
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue