11 lines
218 B
Nim
Raw Permalink Normal View History

# Request utils.
{.push raises: [].}
2021-07-22 10:43:41 +02:00
2026-06-15 09:56:15 -03:00
import libp2p/crypto/crypto, stew/byteutils
2026-06-15 09:56:15 -03:00
proc generateRequestId*(rng: crypto.Rng): string =
var bytes: array[10, byte]
2026-06-15 09:56:15 -03:00
rng.generate(bytes)
2026-02-11 03:00:57 +05:30
return byteutils.toHex(bytes)