2
0
mirror of https://github.com/status-im/nimbus-eth1.git synced 2025-02-03 07:45:18 +00:00
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()[])