nimbus-eth1/nimbus/random_keys.nim

11 lines
227 B
Nim
Raw Normal View History

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