fix random_keys crash

This commit is contained in:
jangko 2020-07-20 15:16:34 +07:00
parent 845671bf0a
commit 9ee04efca4
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ proc getRng*(): ref BrHmacDrbgContext {.gcsafe.} =
theRNG
proc randomPrivateKey*(): PrivateKey =
random(PrivateKey, theRNG[])
random(PrivateKey, getRng()[])
proc randomKeyPair*(): KeyPair =
random(KeyPair, theRNG[])
random(KeyPair, getRng()[])