On 05/10/2025 21:19, Collin Funk wrote:
Pádraig Brady <[email protected]> writes:
p.s. I notice another edge case with checking untagged base64 format.
Theoretically a base64 checksum could start with SHA256 etc.
which would currently cause cksum to treat it as misformatted line.
I wonder how long it will take someone to run into that situation.
According to this python script, 1 in every 64,527 files I think:
tags = ["BSD", "SYSV", "CRC", "CRC32B", "MD5", "SHA1",
"SHA224", "SHA256", "SHA384", "SHA512",
"SHA2", "SHA3", "BLAKE2b", "SM3"]
clash = 0.0
for tag in tags:
clash += 1/(64**len(tag))
print(int(1/clash))