Expand description
§Digestible
§A more dynamic Hash and Hasher trait for Rust
§Key Difference over The Rust Hash and Hasher Traits
- ByteOrder is built in. So you can digest number types in any byte order. ByteOrder
- Output is a Generic Associated Type. So you can Digest into a ByteArray, String with Base64 or any type the Digester uses.
- Skip Fields with
#[digestible(skip)]
- ‘digest_with’ and ‘with’ to override the default digest behavior. digest_with
- Support for all Hashing Algorithms that implement [digest::Digest] such as SHA2, md-5, and many more.
- Writing Type Headers to prevent collisions with similar types. (This is optional and can be disabled with
#[digestible(type_header = none)]
)
§Features
no_std
Support- Digest to implement Digester for all types that implement digest::Digest
- Float and Atomic Support using
digest_with
§Digestible
A trait that allows you to digest data into a Digester Equivalent to Hash but with more control over the digesting process
§Digester
A trait that allows you to digest data into a Target type Equivalent to Hasher but with more control over the digesting process
§DigestWriter
A trait that allows you to write data to a writer. This is used internally by Digester this is what is passed into Digestible to digest data
§Digestible Macro
A macro that allows you to automatically implement Digestible for your types Similar to derive(Hash) but with more control over the digesting process
§Type Headers
Type Header is a way to identify complex type when being digested. Preventing collisions between similar types. This is generated by the macro by putting the type_name of the type in the digest.
§Enums
The Type Header for Enum is written as type_name::variant_name
Modules§
- byteorder
- This crate provides convenience methods for encoding and decoding numbers in either big-endian or little-endian order.
- digest_
with - Provides some sometimes useful digest_with implementations
- digestible
- Default Implementation Notes
- hash_
digester - Provides inter-compatibility with Hasher/Hash and Digester/Digestible
Structs§
- ToBase64
- A Type Wrapper for a Digester that encodes the result into base64
Traits§
- Digest
Writer - A writer trait targeting an in memory buffer or the Digester itself.
- Digester
- A Type that can Digest data into a Target.
- Digestible
- A data type that can be converted into a digest.
- Into
Base64 - Add a method to all Digester types that turns the digester into a ToBase64 type
Derive Macros§
- Digestible
- Digestible Macro