MCPcopy Create free account
hub / github.com/ElementsProject/lightning / gen_rand_preimage_hex

Function gen_rand_preimage_hex

plugins/lsps-plugin/src/client.rs:805–809  ·  view source on GitHub ↗
(rng: &mut R)

Source from the content-addressed store, hash-verified

803}
804
805pub fn gen_rand_preimage_hex<R: Rng + CryptoRng>(rng: &mut R) -> String {
806 let mut pre = [0u8; 32];
807 rng.fill_bytes(&mut pre);
808 hex::encode(&pre)
809}
810
811pub fn payment_hash(preimage: &[u8]) -> sha256::Hash {
812 sha256::Hash::hash(preimage)

Callers 1

on_lsps_lsps2_invoiceFunction · 0.85

Calls 1

encodeFunction · 0.50

Tested by

no test coverage detected