pub(crate) fn next(state: &mut Vec<u8>) -> u64 {
    // state = SHA-3-256(state)
    std::mem::replace(
        state,
        libra_crypto::HashValue::from_sha3_256(state).to_vec(),
    );
    let mut temp = [0u8; 8];
    temp.copy_from_slice(&state[..8]);
    // return state[0..8]
    u64::from_le_bytes(temp)
}
// next continuously mutates a state and returns a u64-index
next continuously mutates a state and returns a u64-index
next continuously mutates a state and returns a u64 - index
pub(crate) fn next(state: &mut Vec<u8>) -> u64 {
    // state = SHA-3-256(state)
    std::mem::replace(
        state,
        libra_crypto::HashValue::from_sha3_256(state).to_vec(),
    );
    let mut temp = [0u8; 8];
    temp.copy_from_slice(&state[..8]);
    // return state[0..8]
    u64::from_le_bytes(temp)
}
pub ( crate ) fn next ( state : & mut Vec < u8 > ) -> u64 { // state = SHA-3-256(state) std :: mem :: replace ( state , libra_crypto :: HashValue :: from_sha3_256 ( state ) . to_vec ( ) , ) ; let mut temp = [ 0u8 ; 8 ] ; temp . copy_from_slice ( & state [ .. 8 ] ) ; // return state[0..8] u64 :: from_le_bytes ( temp ) }
next continuously mutates a state and returns a u64-index
next continuously mutates a state and returns a u64 - index
state
&mut Vec<u8>
state
&mut Vec<u8>