Crates.io | getrandom-runtime-seeded |
lib.rs | getrandom-runtime-seeded |
version | 1.0.0 |
source | src |
created_at | 2024-02-27 23:17:43.048445 |
updated_at | 2024-02-27 23:23:44.792655 |
description | A collection of standardized messages, state structs, and helper functions a contract can use to implement contract migration. |
homepage | |
repository | https://github.com/luca992/getrandom-runtime-seeded |
max_upload_size | |
id | 1155888 |
size | 5,024 |
A custom getrandom implementation that uses a ChaChaRng instance set at runtime.
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);