nimbus-eth1/nimbus/random_keys.nim
2020-07-21 00:16:59 +07:00

11 lines
227 B
Nim

import eth/keys, config
proc getRng*(): ref BrHmacDrbgContext =
getConfiguration().rng
proc randomPrivateKey*(): PrivateKey =
random(PrivateKey, getRng()[])
proc randomKeyPair*(): KeyPair =
random(KeyPair, getRng()[])