Module crypto.rand stdlib

crypto.rand
Version:
0.3.3
License:
MIT
Dependencies from vmod:
0
Imports:
2
Imported by:
3
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

This section is empty.

Imports

Aliases

This section is empty.

Constants

This section is empty.

Sum types

This section is empty.

Functions

#fn bytes

fn bytes(bytes_needed int) ![]u8

bytes returns an array of bytes_needed random bytes.

Note: this call can block your program for a long period of time, if your system does not have access to enough entropy.

See also rand.bytes(), if you do not need really random bytes, but instead pseudo random ones, from a pseudo random generator that can be seeded, and that is usually faster.

#fn int_u64

fn int_u64(max u64) !u64

int_u64 returns a random unsigned 64-bit integer u64 read from a real OS source of entropy.

#fn read

Windows
fn read(bytes_needed int) ![]u8

read returns an array of bytes_needed random bytes read from the OS.

#fn read

Solaris
fn read(bytes_needed int) ![]u8

read returns an array of bytes_needed random bytes read from the OS.

#fn read

OpenBSD
fn read(bytes_needed int) ![]u8

read returns an array of bytes_needed random bytes read from the OS.

#fn read

Linux
fn read(bytes_needed int) ![]u8

read returns an array of bytes_needed random bytes read from the OS.

#fn read

FreeBSD
fn read(bytes_needed int) ![]u8

read returns an array of bytes_needed random bytes read from the OS.

#fn read

fn read(bytes_needed int) ![]u8

read returns an array of bytes_needed random bytes read from the OS.

#fn read

fn read(bytes_needed int) ![]u8

read returns an array of bytes_needed random bytes read from the OS.

Structs

This section is empty.

Interfaces

This section is empty.

Enums

This section is empty.