[go: up one dir, main page]

Crate digest

Source
Expand description

This crate provides traits which describe functionality of cryptographic hash functions and Message Authentication algorithms.

Traits in this repository are organized into the following levels:

Additionally hash functions implement traits from the standard library: Default, Clone, Write. The latter is feature-gated behind std feature, which is usually enabled by default by hash implementation crates.

Re-exports§

pub use crypto_common::rand_core;rand_core
pub use zeroize;zeroize
pub use block_buffer;core-api
pub use const_oid;oid
pub use crypto_common;
pub use crypto_common::array;
pub use crypto_common::typenum;

Modules§

consts
core_apicore-api
Low-level traits operating on blocks and wrappers around them.
devdev
Development-related functionality

Macros§

bench_updatedev
Define Update impl benchmark
hash_rt_outsize_serialization_testdev
Define hash function serialization test
hash_serialization_testdev
Define hash function serialization test
impl_oid_carriercore-api
Implement dummy type with hidden docs which is used to “carry” hasher OID for CtVariableCoreWrapper.
new_mac_testdev and mac
Define MAC test
new_resettable_mac_testdev and mac
Define resettable MAC test
new_testdev
Define hash function test

Structs§

CtOutputmac
Fixed size output value which provides a safe Eq implementation that runs in constant time.
HashReaderstd
Abstraction over a reader which hashes the data being read
HashWriterstd
Abstraction over a writer which hashes the data being written.
InvalidBufferSize
Buffer length is not equal to hash output size.
InvalidLengthmac
The error type returned when key and/or IV used in the KeyInit, KeyIvInit, and InnerIvInit slice-based methods had an invalid length.
InvalidOutputSize
The error type used in variable hash traits.
MacErrormac
Error type for when the Output of a Mac is not equal to the expected value.

Traits§

CustomizedInit
Trait for hash functions with customization string for domain separation.
Digest
Convenience wrapper trait covering functionality of cryptographic hash functions with fixed output size.
DynDigest
Modification of the Digest trait suitable for trait objects.
DynDigestWithOidconst-oid
Convenience wrapper trait around DynDigest and DynAssociatedOid.
ExtendableOutput
Trait for hash functions with extendable-output (XOF).
ExtendableOutputReset
Trait for hash functions with extendable-output (XOF) able to reset themselves.
FixedOutput
Trait for hash functions with fixed-size output.
FixedOutputReset
Trait for hash functions with fixed-size output able to reset themselves.
HashMarker
Marker trait for cryptographic hash functions.
InnerInitmac
Types which can be initialized from another type (usually block ciphers).
KeyInitmac
Types which can be initialized from key.
Macmac
Convenience wrapper trait covering functionality of Message Authentication algorithms.
MacMarkermac
Marker trait for Message Authentication algorithms.
OutputSizeUser
Types which return data with the given size.
Reset
Resettable types.
Update
Types which consume data with byte granularity.
VariableOutput
Trait for hash functions with variable-size output.
VariableOutputReset
Trait for hash functions with variable-size output able to reset themselves.
XofReader
Trait for reader types which are used to extract extendable output from a XOF (extendable-output function) result.

Type Aliases§

Keymac
Key used by KeySizeUser implementors.
Output
Output array of OutputSizeUser implementors.