src/cpython/secrets

Procs

proc randbelow(n: int): int {....raises: [Exception, ValueError, OSError, IOError,
                                       EOFError, KeyError], tags: [RootEffect].}
proc randbits(k: int): int {....raises: [Exception, ValueError, OSError, IOError,
                                      EOFError, KeyError], tags: [RootEffect].}
proc choice(sequence: seq[int]): int {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc choice(sequence: seq[char]): char {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc choice(sequence: seq[bool]): bool {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc choice(sequence: seq[float]): float {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc choice(sequence: seq[string]): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc token_bytes(number_of_bytes: int): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc token_bytes(): string {....raises: [Exception, ValueError, OSError, IOError,
                                      EOFError, KeyError], tags: [RootEffect].}
proc token_hex(number_of_bytes: int): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc token_hex(): string {....raises: [Exception, ValueError, OSError, IOError,
                                    EOFError, KeyError], tags: [RootEffect].}
proc token_urlsafe(number_of_bytes: int): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc token_urlsafe(): string {....raises: [Exception, ValueError, OSError, IOError,
                                        EOFError, KeyError], tags: [RootEffect].}
proc compare_digest(digestA, digestB: string): bool {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}