[go: up one dir, main page]

Crate hash

Source
Available on crate feature index only.
Expand description

This crate provides types for identifying git objects using a hash digest.

These are provided in borrowed versions as well as an owned one.

§Feature Flags

Modules§

decode
hasher
Hash functions and hash utilities
io
Error types for utility hash functions
prefix
verify

Structs§

Hasher
An implementation of the Sha1 hash, which can be used once.
Prefix
A partial, owned hash possibly identifying an object uniquely, whose non-prefix bytes are zeroed.
oid
A borrowed reference to a hash identifying objects.

Enums§

Error
The error returned when trying to convert a byte slice to an oid or ObjectId
Kind
Denotes the kind of function to produce a ObjectId.
ObjectId
An owned hash identifying objects, most commonly Sha1

Functions§

bytes
Similar to bytes_of_file, but operates on a stream of bytes.
bytes_of_file
Compute the hash of kind for the bytes in the file at path, hashing only the first num_bytes_from_start while initializing and calling progress.
bytes_with_hasher
Similar to bytes(), but takes a hasher instead of a hash kind.
hasher
Produce a hasher suitable for the given kind of hash.