Documentation ¶
Overview ¶
Package rand provides support for various RNG-related functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomBytes ¶
RandomBytes generates bytesToRead random bytes. This implementation uses either the default RNG algorithm ("system"), or whichever algorithm has been selected by RandomBytesSwitchAlgorithm.
func RandomBytesCustomAlgorithm ¶
RandomBytesCustomAlgorithm switches RandomBytes to use the given function. This allows additional custom RNGs besides the provided ones. The provided RNG function must have the same signature as RandomBytesInPlace, i.e. func([]byte, int).
func RandomBytesInPlace ¶
RandomBytesInPlace generates bytesToRead random bytes. This implementation uses either the default RNG algorithm ("system"), or whichever algorithm has been selected by RandomBytesSwitchAlgorithm. If bytesToRead exceeds the size of randomArray, only len(randomArray) bytes are read.
func RandomBytesSwitchAlgorithm ¶
RandomBytesSwitchAlgorithm switches the core OQS_randombytes to use the specified algorithm. Possible values are "system" and "OpenSSL". See <oqs/rand.h> liboqs header for more details.
Types ¶
This section is empty.