nimbus-eth1/nimbus/random_keys.nim

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()[])