pub fn random_bytes(
    _ribosome: Arc<impl RibosomeT>,
    _call_context: Arc<CallContext>,
    input: u32,
) -> Result<Bytes, WasmError> {
    let system_random = ring::rand::SystemRandom::new();
    let mut bytes = vec![0; input as _];
    system_random
        .fill(&mut bytes)
        .map_err(|ring_unspecified_error| WasmError::Host(ring_unspecified_error.to_string()))?;

    Ok(Bytes::from(bytes))
}
/// return n crypto secure random bytes from the standard aingle crypto lib
return n crypto secure random bytes from the standard aingle crypto lib
return n crypto secure random bytes from the standard aingle crypto lib
pub fn random_bytes(
    _ribosome: Arc<impl RibosomeT>,
    _call_context: Arc<CallContext>,
    input: u32,
) -> Result<Bytes, WasmError> {
    let system_random = ring::rand::SystemRandom::new();
    let mut bytes = vec![0; input as _];
    system_random
        .fill(&mut bytes)
        .map_err(|ring_unspecified_error| WasmError::Host(ring_unspecified_error.to_string()))?;
    Ok(Bytes::from(bytes))
}
pub fn random_bytes ( _ribosome : Arc < impl RibosomeT > , _call_context : Arc < CallContext > , input : u32 , ) -> Result < Bytes , WasmError > { let system_random = ring :: rand :: SystemRandom :: new ( ) ; let mut bytes = vec ! [ 0 input as ] ; system_random . fill ( & mut bytes ) . map_err ( | ring_unspecified_error | WasmError :: Host ( ring_unspecified_error . to_string ( ) ) ) ? ; Ok ( Bytes :: from ( bytes ) ) }
return n crypto secure random bytes from the standard aingle crypto lib
return n crypto secure random bytes from the standard aingle crypto lib
_ribosome
Arc<impl RibosomeT>
_call_context
Arc<CallContext>
input
u32
_ribosome
Arc<impl RibosomeT>
_call_context
Arc<CallContext>
input
u32