Function getRNG [src]
Produces and returns an RNG value using either the default or specified RNG algorithm.
Prototype
pub fn getRNG(self: *const Rng, algo: ?*align(8) const Guid, value: []u8) GetRNGError!void
Parameters
self: *const Rng
algo: ?*align(8) const Guid
value: []u8
Possible Errors
Source
pub fn getRNG(self: *const Rng, algo: ?*align(8) const Guid, value: []u8) GetRNGError!void {
switch (self._get_rng(self, algo, value.len, value.ptr)) {
.success => {},
.unsupported => return Error.Unsupported,
.device_error => return Error.DeviceError,
.not_ready => return Error.NotReady,
.invalid_parameter => return Error.InvalidParameter,
else => |status| return uefi.unexpectedStatus(status),
}
}