nwaku/waku/v2/utils/requests.nim

9 lines
191 B
Nim
Raw Normal View History

# Request utils.
import bearssl, stew/byteutils
proc generateRequestId*(rng: ref BrHmacDrbgContext): string =
var bytes: array[10, byte]
brHmacDrbgGenerate(rng[], bytes)
toHex(bytes)