MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / getentropy

Function getentropy

crates/runtime/src/sim_std.rs:174–182  ·  view source on GitHub ↗
(buf: *mut u8, buflen: usize)

Source from the content-addressed store, hash-verified

172#[unsafe(no_mangle)]
173#[inline(never)]
174unsafe extern "C" fn getentropy(buf: *mut u8, buflen: usize) -> i32 {
175 if buflen > 256 {
176 return -1;
177 }
178 match unsafe { getrandom(buf, buflen, 0) } {
179 -1 => -1,
180 _ => 0,
181 }
182}
183
184#[cfg(test)]
185mod tests {

Callers

nothing calls this directly

Calls 1

getrandomFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…