pub fn canonical_algorithm_name(name: &str) -> StringExpand description
Normalizes a hash algorithm name to its canonical form.
Handles variations in casing and hyphenation so that algorithm names from different SBOM formats (SPDX, CycloneDX) compare equal.
ยงExample
use sbom_model::canonical_algorithm_name;
assert_eq!(canonical_algorithm_name("SHA256"), "SHA-256");
assert_eq!(canonical_algorithm_name("SHA-256"), "SHA-256");
assert_eq!(canonical_algorithm_name("sha256"), "SHA-256");