checksums: add SHA-512 and a Checksums-* field parser

The checksum model only carried md5/sha1/sha256 while deb-buildinfo(5)
defines Checksums-Sha512, and there was no way to parse a Checksums-*
field body back into entries. Add ChecksumKind::Sha512 (computed
alongside the others), a field parser validating the
'<hex> <size> <name>' grammar, and an only-if-populated
Checksums-Sha512 emission in .buildinfo — deliberately dormant in the
dpkg-parity flows, which never emit it, and .dsc/.changes untouched.
This commit is contained in:
2026-09-17 19:44:54 +02:00
parent d6bad9fbbe
commit 93296c26c1
5 changed files with 364 additions and 4 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ pub use changelog::{
ChangelogEntry, parse_changelog_entry, parse_changelog_entry_from_str,
parse_previous_version_from_str,
};
pub use checksums::{Entry as ChecksumEntry, FileChecksums};
pub use checksums::{ChecksumKind, Entry as ChecksumEntry, FileChecksums};
pub use control::{
ControlInfo, Paragraph, parse_paragraphs, strip_clearsigned_armour, write_paragraph,
};