nwaku/waku/utils/requests.nim

11 lines
220 B
Nim

# Request utils.
{.push raises: [].}
import bearssl/rand, stew/byteutils
proc generateRequestId*(rng: ref HmacDrbgContext): string =
var bytes: array[10, byte]
hmacDrbgGenerate(rng[], bytes)
return toHex(bytes)