pub fn double_sha256(input: &[u8]) -> Hash32Buf {
        let digest1 = ring::digest::digest(&ring::digest::SHA256, input);
        let digest2 = ring::digest::digest(&ring::digest::SHA256, digest1.as_ref());

        // convert to HashBuf
        Hash32Buf::from_slice(digest2.as_ref())
    }
/// Hashes the input twice with SHA256 and returns an owned buffer;
/// Can be extracted as an Hash32 using as_ref()
Hashes the input twice with SHA256 and returns an owned buffer;
Can be extracted as an Hash32 using as_ref()
Hashes the input twice with SHA256 and returns an owned buffer ; Can be extracted as an Hash32 using as_ref ()
pub fn double_sha256(input: &[u8]) -> Hash32Buf {
        let digest1 = ring::digest::digest(&ring::digest::SHA256, input);
        let digest2 = ring::digest::digest(&ring::digest::SHA256, digest1.as_ref());
        // convert to HashBuf
        Hash32Buf::from_slice(digest2.as_ref())
    }
pub fn double_sha256 ( input : & [ u8 ] ) -> Hash32Buf { let digest1 = ring :: digest :: digest ( & ring :: digest :: SHA256 , input ) ; let digest2 = ring :: digest :: digest ( & ring :: digest :: SHA256 , digest1 . as_ref ( ) ) ; // convert to HashBuf Hash32Buf :: from_slice ( digest2 . as_ref ( ) ) }
Hashes the input twice with SHA256 and returns an owned buffer;
Can be extracted as an Hash32 using as_ref()
Hashes the input twice with SHA256 and returns an owned buffer ; Can be extracted as an Hash32 using as_ref ()
input
&[u8]
input
&[u8]