mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-05-12 05:19:33 +00:00
11 lines
218 B
Nim
11 lines
218 B
Nim
# Request utils.
|
|
|
|
{.push raises: [].}
|
|
|
|
import libp2p/crypto/crypto, stew/byteutils
|
|
|
|
proc generateRequestId*(rng: crypto.Rng): string =
|
|
var bytes: array[10, byte]
|
|
rng.generate(bytes)
|
|
return byteutils.toHex(bytes)
|