2020-07-20 17:16:59 +00:00
|
|
|
import eth/keys, config
|
2020-07-20 06:50:05 +00:00
|
|
|
|
2020-07-20 17:16:59 +00:00
|
|
|
proc getRng*(): ref BrHmacDrbgContext =
|
|
|
|
getConfiguration().rng
|
2020-07-20 06:50:05 +00:00
|
|
|
|
|
|
|
proc randomPrivateKey*(): PrivateKey =
|
2020-07-20 08:16:34 +00:00
|
|
|
random(PrivateKey, getRng()[])
|
2020-07-20 06:50:05 +00:00
|
|
|
|
|
|
|
proc randomKeyPair*(): KeyPair =
|
2020-07-20 08:16:34 +00:00
|
|
|
random(KeyPair, getRng()[])
|