mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-02-06 14:17:02 +00:00
Use u128::from_ne_bytes(buffer).to_string()
base64 crate is small, but I guess we don't benefit from it much either
This commit is contained in:
parent
4df5a19037
commit
bee0175776
@ -135,7 +135,7 @@ fn replace_csp_nonce(
|
||||
// > https://w3c.github.io/webappsec-csp/#security-nonces
|
||||
let mut buffer: [u8; 16] = [0; 16];
|
||||
getrandom::fill(&mut buffer).expect("failed to get random bytes");
|
||||
format!("{buffer:x?}")
|
||||
u128::from_ne_bytes(buffer).to_string()
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user