pub opaque type Digest
pub type Failure { InvalidBitSize(bits: Int) }
InvalidBitSize(bits: Int)
pub fn sha256(bytes: BitArray) -> Result(Digest, Failure)
Computes SHA-256 for byte-aligned input, returning InvalidBitSize when the input ends between byte boundaries.
InvalidBitSize
pub fn to_bit_array(digest: Digest) -> BitArray
Returns the 32 digest bytes.
pub fn to_hex(digest: Digest) -> String
Returns the digest as 64 lowercase hexadecimal characters.