tahoe-chk-0.2.0.0: The Tahoe-LAFS' Content-Hash-Key (CHK) cryptographic protocol.
Safe HaskellNone
LanguageHaskell2010

Tahoe.CHK.Crypto

Synopsis

Documentation

toBytes :: ByteArrayAccess a => a -> ByteString Source #

Extract the bytes from a value like a Digest hash`.

taggedHash' :: HashAlgorithm hash => ByteString -> ByteString -> Digest' hash Source #

Compute the "tagged hash" of a byte string: the hash of the concatenation of the netstring encoding of a tag and the given bytes.

taggedPairHash' :: HashAlgorithm hash => ByteString -> ByteString -> ByteString -> Digest' hash Source #

Compute the "tagged pair hash" of two byte strings: the hash of the concatenation of the netstring encoding of a tag and each of two other byte strings.

blockHash' :: HashAlgorithm hash => ByteString -> Digest' hash Source #

Compute the hash of a share block. This is the same function as allmydata.util.hashutil.block_hash.

ciphertextSegmentHash' :: HashAlgorithm hash => ByteString -> Digest' hash Source #

Compute the hash of a segment of ciphertext.