From 8ce1155a1eb490625a7e949a10c4283b4b773d30 Mon Sep 17 00:00:00 2001 From: Kim Altintop Date: Thu, 13 Apr 2023 16:50:24 +0200 Subject: core: replace bundle checksum with BLAKE3 BLAKE3 has a verified streaming mode (Bao), which allows variable chunk sizes without altering the root hash. This means that a BLAKE3 hash can serve as a long-term stable content address in location-independent storage (as demonstrated by iroh). Signed-off-by: Kim Altintop --- src/patches.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/patches.rs') diff --git a/src/patches.rs b/src/patches.rs index 8623e4e..5efcf90 100644 --- a/src/patches.rs +++ b/src/patches.rs @@ -15,16 +15,14 @@ use anyhow::{ bail, }; -use hex::FromHex; -use once_cell::sync::Lazy; -use sha2::{ - digest::{ - generic_array::GenericArray, - typenum::U32, - }, +use digest::{ + generic_array::GenericArray, + typenum::U32, Digest, - Sha256, }; +use hex::FromHex; +use once_cell::sync::Lazy; +use sha2::Sha256; use crate::{ git::Refname, -- cgit v1.2.3