v0.4.0

Fill functionv0.1.0

Source
Fills length bytes of buffer from the operating system.
pub unsafe func Fill(
    buffer: *var opaque,
    length: uint
) throws EntropyError

buffer is borrowed and written; length is read by value. This is the call to make when there is no reason to name a source: it is FillFrom over SystemEntropy, with the same contract. Runs in time proportional to length and allocates nothing. Safety: buffer must be writable for length bytes. On any failure the whole buffer is zeroized.

Parameters

NameTypeDescription
buffer*var opaquereceives the bytes
lengthuinthow many bytes to fill

Returns: nothing when every byte was written, or why not