fn generate_random_bytes(len: usize) -> Box<[u8]> {
        let mut lcg: u32 = 0xec57c4bf;

        let mut bytes = vec![0; len];

        for quad in bytes.chunks_mut(4) {
            lcg = lcg.wrapping_mul(1664525).wrapping_add(1013904223);
            for (src, dest) in quad.iter_mut().zip(&lcg.to_ne_bytes()) {
                *src = *dest;
            }
        }

        bytes.into_boxed_slice()
    }
/// Generate a random vector of bytes of the specified length using a PRNG.
Generate a random vector of bytes of the specified length using a PRNG.
Generate a random vector of bytes of the specified length using a PRNG .
fn generate_random_bytes(len: usize) -> Box<[u8]> {
        let mut lcg: u32 = 0xec57c4bf;
        let mut bytes = vec![0; len];
        for quad in bytes.chunks_mut(4) {
            lcg = lcg.wrapping_mul(1664525).wrapping_add(1013904223);
            for (src, dest) in quad.iter_mut().zip(&lcg.to_ne_bytes()) {
                *src = *dest;
            }
        }
        bytes.into_boxed_slice()
    }
fn generate_random_bytes ( len : usize ) -> Box < [ u8 ] > { let mut lcg : u32 = 0xec57c4bf ; let mut bytes = vec ! [ 0 len ] ; for quad in bytes . chunks_mut ( 4 ) { lcg = lcg . wrapping_mul ( 1664525 ) . wrapping_add ( 1013904223 ) ; for ( src , dest ) in quad . iter_mut ( ) . zip ( & lcg . to_ne_bytes ( ) ) { * src = * dest ; } } bytes . into_boxed_slice ( ) }
Generate a random vector of bytes of the specified length using a PRNG.
Generate a random vector of bytes of the specified length using a PRNG .
len
usize
len
usize