fn xor_with_hash(g1: G1, bytes: &[u8]) -> Vec<u8> {
    let digest = sha3_256(g1.into_affine().into_compressed().as_ref());
    let mut rng = ChaChaRng::from_seed(digest);
    //let mut rng = rand::thread_rng();
    //let mut rng = getrandom(digest);
    
    //let mut rng = thread_rng();
    let xor = |(a, b): (u8, &u8)| a ^ b;
    rng.sample_iter(&Standard).zip(bytes).map(xor).collect()
}
/// Returns the bitwise xor of `bytes` with a sequence of pseudorandom bytes determined by `g1`.
Returns the bitwise xor of `bytes` with a sequence of pseudorandom bytes determined by `g1`.
Returns the bitwise xor of ` bytes ` with a sequence of pseudorandom bytes determined by ` g1 ` .
fn xor_with_hash(g1: G1, bytes: &[u8]) -> Vec<u8> {
    let digest = sha3_256(g1.into_affine().into_compressed().as_ref());
    let mut rng = ChaChaRng::from_seed(digest);
    //let mut rng = rand::thread_rng();
    //let mut rng = getrandom(digest);
    //let mut rng = thread_rng();
    let xor = |(a, b): (u8, &u8)| a ^ b;
    rng.sample_iter(&Standard).zip(bytes).map(xor).collect()
}
fn xor_with_hash ( g1 : G1 , bytes : & [ u8 ] ) -> Vec < u8 > { let digest = sha3_256 ( g1 . into_affine ( ) . into_compressed ( ) . as_ref ( ) ) ; let mut rng = ChaChaRng :: from_seed ( digest ) ; //let mut rng = rand::thread_rng(); //let mut rng = getrandom(digest); //let mut rng = thread_rng(); let xor = | ( a , b ) : ( u8 , & u8 ) | a ^ b ; rng . sample_iter ( & Standard ) . zip ( bytes ) . map ( xor ) . collect ( ) }
Returns the bitwise xor of `bytes` with a sequence of pseudorandom bytes determined by `g1`.
Returns the bitwise xor of ` bytes ` with a sequence of pseudorandom bytes determined by ` g1 ` .
g1
G1
bytes
&[u8]
g1
G1
bytes
&[u8]