MCPcopy Create free account
hub / github.com/docknetwork/crypto / gen_messages

Function gen_messages

saver/src/encryption.rs:911–919  ·  view source on GitHub ↗
(
        rng: &mut R,
        count: u32,
        chunk_bit_size: u8,
    )

Source from the content-addressed store, hash-verified

909 }
910
911 pub fn gen_messages<R: RngCore>(
912 rng: &mut R,
913 count: u32,
914 chunk_bit_size: u8,
915 ) -> Vec<CHUNK_TYPE> {
916 (0..count)
917 .map(|_| (u32::rand(rng) & ((1 << chunk_bit_size) - 1)) as CHUNK_TYPE)
918 .collect()
919 }
920
921 #[test]
922 fn encrypt_decrypt() {

Callers 3

checkFunction · 0.85
checkFunction · 0.85
checkFunction · 0.85

Calls 2

randFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected