getrandom-runtime-seeded

Crates.iogetrandom-runtime-seeded
lib.rsgetrandom-runtime-seeded
version1.0.0
sourcesrc
created_at2024-02-27 23:17:43.048445
updated_at2024-02-27 23:23:44.792655
descriptionA collection of standardized messages, state structs, and helper functions a contract can use to implement contract migration.
homepage
repositoryhttps://github.com/luca992/getrandom-runtime-seeded
max_upload_size
id1155888
size5,024
Luca Spinazzola (luca992)

documentation

README

getrandom-runtime-seeded

A custom getrandom implementation that uses a ChaChaRng instance set at runtime.

Setup

To register the function, we first depend on getrandom-runtime-seeded and getrandom with the custom feature in Cargo.toml:

[dependencies]
getrandom-runtime-seeded = "0.1"
getrandom = { version = "0.2", features = ["custom"] }
``

Then, we register the function in src/lb.rs:

use getrandom-runtime-seeded::always_fail;
use getrandom::register_custom_getrandom;

register_custom_getrandom!(always_fail);
Commit count: 0

cargo fmt