fn merkle_crh_sprout(left: [u8; 32], right: [u8; 32]) -> [u8; 32] {
    let mut other_block = [0u8; 64];
    other_block[..32].copy_from_slice(&left[..]);
    other_block[32..].copy_from_slice(&right[..]);

    // H256: SHA-256 initial state.
    // https://github.com/RustCrypto/hashes/blob/master/sha2/src/consts.rs#L170
    let mut state = [
        0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab,
        0x5be0cd19,
    ];

    sha2::compress256(&mut state, &[GenericArray::clone_from_slice(&other_block)]);

    // Yes, SHA-256 does big endian here.
    // https://github.com/RustCrypto/hashes/blob/master/sha2/src/sha256.rs#L40
    let mut derived_bytes = [0u8; 32];
    BigEndian::write_u32_into(&state, &mut derived_bytes);

    derived_bytes
}
/// [MerkleCRH^Sprout] Hash Function.
///
/// Creates nodes of the note commitment tree.
///
/// MerkleCRH^Sprout(layer, left, right) := SHA256Compress(left || right).
///
/// Note: the implementation of MerkleCRH^Sprout does not use the `layer`
/// argument from the definition above since the argument does not affect the output.
///
/// [MerkleCRH^Sprout]: https://zips.z.cash/protocol/protocol.pdf#merklecrh.




the implementation of MerkleCRH^Sprout does not use the `layer`
argument from the definition above since the argument does not affect the output.


the implementation of MerkleCRH^Sprout does not use the ` layer ` argument from the definition above since the argument does not affect the output .
fn merkle_crh_sprout(left: [u8; 32], right: [u8; 32]) -> [u8; 32] {
    let mut other_block = [0u8; 64];
    other_block[..32].copy_from_slice(&left[..]);
    other_block[32..].copy_from_slice(&right[..]);
    // H256: SHA-256 initial state.
    // https://github.com/RustCrypto/hashes/blob/master/sha2/src/consts.rs#L170
    let mut state = [
        0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab,
        0x5be0cd19,
    ];
    sha2::compress256(&mut state, &[GenericArray::clone_from_slice(&other_block)]);
    // Yes, SHA-256 does big endian here.
    // https://github.com/RustCrypto/hashes/blob/master/sha2/src/sha256.rs#L40
    let mut derived_bytes = [0u8; 32];
    BigEndian::write_u32_into(&state, &mut derived_bytes);
    derived_bytes
}
fn merkle_crh_sprout ( left : [ u8 ; 32 ] , right : [ u8 ; 32 ] ) -> [ u8 ; 32 ] { let mut other_block = [ 0u8 ; 64 ] ; other_block [ .. 32 ] . copy_from_slice ( & left [ .. ] ) ; other_block [ 32 .. ] . copy_from_slice ( & right [ .. ] ) ; // H256: SHA-256 initial state. // https://github.com/RustCrypto/hashes/blob/master/sha2/src/consts.rs#L170 let mut state = [ 0x6a09e667 , 0xbb67ae85 , 0x3c6ef372 , 0xa54ff53a , 0x510e527f , 0x9b05688c , 0x1f83d9ab , 0x5be0cd19 , ] ; sha2 :: compress256 ( & mut state , & [ GenericArray :: clone_from_slice ( & other_block ) ] ) ; // Yes, SHA-256 does big endian here. // https://github.com/RustCrypto/hashes/blob/master/sha2/src/sha256.rs#L40 let mut derived_bytes = [ 0u8 ; 32 ] ; BigEndian :: write_u32_into ( & state , & mut derived_bytes ) ; derived_bytes }
[MerkleCRH^Sprout] Hash Function.
[ MerkleCRH^Sprout ] Hash Function .
left
[u8; 32]
right
[u8; 32]