Skip to main content

Module nixhash

Module nixhash 

Source

Modulesยง

algos ๐Ÿ”’
ca_hash ๐Ÿ”’
digester ๐Ÿ”’
io ๐Ÿ”’ async
Helpers that calcutate the hash of the data written and count the number of bytes written.
serdeserde
sha256 ๐Ÿ”’

Structsยง

NixHashDigester
A digester that takes in bytes and ultimately produces a NixHash.
Sha256
A SHA256 hash.
Sha256Digester
A digester that takes in bytes and ultimately produces a Sha256.

Enumsยง

CAHash
A Nix CAHash describes a content-addressed hash of a path.
CAHashMode
Representation for the supported hash modes.
Error
Errors related to NixHash construction.
HashAlgo
This are the hash algorithms supported by cppnix.
NixHash
NixHash represents hashes known by Nix (md5/sha1/sha256/sha512).

Functionsยง

copy_buf_hashedasync
Asynchronously copies the entire contents of a reader into a writer while hashing.
copy_buf_sha256async
Asynchronously copies the entire contents of a reader into a writer while hashing.
copy_hashedasync
Asynchronously copies the entire contents of a reader into a writer while hashing.
copy_sha256async
Asynchronously copies the entire contents of a reader into a writer while hashing.
decode_digest ๐Ÿ”’
Decode a plain digest depending on the hash algo specified externally. hexlower, nixbase32 and base64 encodings are supported - the encoding is inferred from the input length.