wasm fixes

This commit is contained in:
John Smith
2022-11-27 10:52:07 -05:00
parent 87366c7fb2
commit 80c8a62ea1
9 changed files with 36 additions and 74 deletions

View File

@@ -28,6 +28,8 @@ impl RngCore for VeilidRng {
cfg_if! {
if #[cfg(target_arch = "wasm32")] {
use js_sys::Math;
pub fn random_bytes(dest: &mut [u8]) -> EyreResult<()> {
let len = dest.len();
let u32len = len / 4;