mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
ENT-11678: Mark Corda SecureRandom as thread safe
This avoids a mutex contention as the JDK assumes it’s not thread safe.
This commit is contained in:
parent
4f4a6fbcf0
commit
1356cbf10e
@ -15,7 +15,7 @@ import java.security.SecureRandomSpi
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
class PlatformSecureRandomService(provider: Provider)
|
||||
: Provider.Service(provider, "SecureRandom", ALGORITHM, PlatformSecureRandomSpi::class.java.name, null, null) {
|
||||
: Provider.Service(provider, "SecureRandom", ALGORITHM, PlatformSecureRandomSpi::class.java.name, null, mapOf("ThreadSafe" to "true")) {
|
||||
|
||||
companion object {
|
||||
const val ALGORITHM = "CordaPRNG"
|
||||
|
Loading…
Reference in New Issue
Block a user