fn prf_addr(x: [u8; 32], t: u8) -> [u8; 32] {
    let mut state = [0u32; 8];
    let mut block = GenericArray::<u8, U64>::default();

    block.as_mut_slice()[0..32].copy_from_slice(&x[..]);
    // The first four bits –i.e. the most signicant four bits of the
    // first byte– are used to separate distinct uses
    // of SHA256Compress, ensuring that the functions are independent.
    block.as_mut_slice()[0] |= 0b1100_0000;

    block.as_mut_slice()[32] = t;

    sha2::compress256(&mut state, &[block]);

    let mut derived_bytes = [0u8; 32];
    LittleEndian::write_u32_into(&state, &mut derived_bytes);

    derived_bytes
}
/// PRF^addr is used to derive a Sprout shielded payment address from
/// a spending key, and instantiated using the SHA-256 compression
/// function.
///
/// https://zips.z.cash/protocol/protocol.pdf#abstractprfs
/// https://zips.z.cash/protocol/protocol.pdf#sproutkeycomponents
PRF^addr is used to derive a Sprout shielded payment address from
a spending key, and instantiated using the SHA-256 compression
function.


PRF^addr is used to derive a Sprout shielded payment address from a spending key and instantiated using the SHA - 256 compression function .
fn prf_addr(x: [u8; 32], t: u8) -> [u8; 32] {
    let mut state = [0u32; 8];
    let mut block = GenericArray::<u8, U64>::default();
    block.as_mut_slice()[0..32].copy_from_slice(&x[..]);
    // The first four bits –i.e. the most signicant four bits of the
    // first byte– are used to separate distinct uses
    // of SHA256Compress, ensuring that the functions are independent.
    block.as_mut_slice()[0] |= 0b1100_0000;
    block.as_mut_slice()[32] = t;
    sha2::compress256(&mut state, &[block]);
    let mut derived_bytes = [0u8; 32];
    LittleEndian::write_u32_into(&state, &mut derived_bytes);
    derived_bytes
}
fn prf_addr ( x : [ u8 ; 32 ] , t : u8 ) -> [ u8 ; 32 ] { let mut state = [ 0u32 ; 8 ] ; let mut block = GenericArray :: < u8 , U64 > :: default ( ) ; block . as_mut_slice ( ) [ 0 .. 32 ] . copy_from_slice ( & x [ .. ] ) ; // The first four bits –i.e. the most signicant four bits of the // first byte– are used to separate distinct uses // of SHA256Compress, ensuring that the functions are independent. block . as_mut_slice ( ) [ 0 ] |= 0b1100_0000 ; block . as_mut_slice ( ) [ 32 ] = t ; sha2 :: compress256 ( & mut state , & [ block ] ) ; let mut derived_bytes = [ 0u8 ; 32 ] ; LittleEndian :: write_u32_into ( & state , & mut derived_bytes ) ; derived_bytes }
PRF^addr is used to derive a Sprout shielded payment address from
a spending key, and instantiated using the SHA-256 compression
function.
PRF^addr is used to derive a Sprout shielded payment address from a spending key and instantiated using the SHA - 256 compression function .
x
[u8; 32]
t
u8