src/prologue/core/urandom

Source   Edit  

Consts

DefaultEntropy = 32
The default length of random string. Source   Edit  

Procs

proc randomBytesSeq(size = DefaultEntropy): seq[byte] {.inline, ...raises: [],
    tags: [], forbids: [].}
Generates a new system random sequence of bytes. Source   Edit  
proc randomBytesSeq[size: static[int]](): array[size, byte] {.inline.}
Generates a new system random sequence of bytes. Source   Edit  
proc randomSecretKey(size = DefaultEntropy): SecretKey {.inline, ...raises: [],
    tags: [], forbids: [].}
Generates a new system random secretKey. Source   Edit  
proc randomString(size = DefaultEntropy): string {.inline, ...raises: [], tags: [],
    forbids: [].}
Generates a new system random strings. Source   Edit