Skip to main content

hash

Function hash 

Source
pub async fn hash<D: Digest + Write>(
    r: impl AsyncRead + Unpin,
    w: impl AsyncWrite + Unpin,
) -> Result<(Output<D>, u64)>
Available on crate feature async only.
Expand description

Copies all data from the passed reader to the passed writer. Afterwards, it also returns the resulting digest::Digest, as well as the number of bytes copied. The exact hash function used is left generic over all digest::Digest.