Don't drop blake2b hashes (#18794)

An oversight from adding blake2b hashes.
This commit is contained in:
konsti
2026-04-01 14:07:56 +02:00
committed by GitHub
parent 5b369e6370
commit 5b414b1119
+8 -1
View File
@@ -649,7 +649,8 @@ impl From<Hashes> for HashDigests {
usize::from(value.sha512.is_some())
+ usize::from(value.sha384.is_some())
+ usize::from(value.sha256.is_some())
+ usize::from(value.md5.is_some()),
+ usize::from(value.md5.is_some())
+ usize::from(value.blake2b.is_some()),
);
if let Some(sha512) = value.sha512 {
digests.push(HashDigest {
@@ -675,6 +676,12 @@ impl From<Hashes> for HashDigests {
digest: md5,
});
}
if let Some(blake2b) = value.blake2b {
digests.push(HashDigest {
algorithm: HashAlgorithm::Blake2b,
digest: blake2b,
});
}
Self::from(digests)
}
}