diff options
Diffstat (limited to 'src/util/data.rs')
-rw-r--r-- | src/util/data.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/data.rs b/src/util/data.rs index 591b7605..cb784730 100644 --- a/src/util/data.rs +++ b/src/util/data.rs @@ -87,9 +87,9 @@ pub fn sha256sum(data: &[u8]) -> Hash { use sha2::{Digest, Sha256}; let mut hasher = Sha256::new(); - hasher.input(data); + hasher.update(data); let mut hash = [0u8; 32]; - hash.copy_from_slice(&hasher.result()[..]); + hash.copy_from_slice(&hasher.finalize()[..]); hash.into() } |