Fill functionv0.1.0
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
| Name | Type | Description |
|---|---|---|
buffer | *var opaque | receives the bytes |
length | uint | how many bytes to fill |
Returns: nothing when every byte was written, or why not