Reference

std/digest

Message digests: Sha256 and Sha512, the SHA-256 and SHA-512 of FIPS 180-4, and the Digest both answer. SHA-256 is what the package manager pins a package by (docs/design/RELEASE.md section 7.2) and what a download is checked against; SHA-512 is what Ed25519 hashes with (std/signature).

Ordinary TorbScript with no native. SHA-256 works over Int, every word kept below 2^32 by a mask, so nothing overflows; SHA-512 over UInt64 and its wrapping sum. The same bytes give the same digest in both back ends.

Modules

Everything