The major change in this version is the increase of the Minimum Supported Rust Version (MSRV) from 1.29 to 1.41.1. This is a big change because it introduces Rust Edition 2018 to the codebase along with all the benefits that brings. We also did a bunch of optimisations to speed up encoding and decoding hex strings.
- Add
all_zerostoHashtrait - Implement
WriteonHmacEngine - Introduce
HexWriter, makes serialising hex faster - Implement
ReadonHexIterator, makes deserialising hex faster
- Use
rotate_leftinstead of custom macro - Enable clippy on CI
- Various docs fixes
- Improve feature test coverage
- Add a disabled
rustfmt.tomlto improve interaction with auto-formatting in editors
- Increase
core2to released version of 0.3.0
- Introduce
allocfeature andcore2dependency for nostd support (this feature has MSRV of 1.36 rather than 1.29)
- Re-export
coreas_export::_core. This resolves an issue when calling several exported macros with thestdfeature.
- Add
#[repr(transparent)]to all newtype wrappers - Add missing
#derives - Replace
fuzztargetfeature with use ofcfg(fuzzing) - Use
corerather thanstdand fixno_stdcompilation
Note that we have stopped re-exporting the core crate when compiling without std. This is technically a breaking change but it is hard to imagine what user might be affected.
- Add
Hmac::from_inner_engines
- More serde macro fixes
- Fix rustc 1.29.0 downstream issues with serde macros
- Fix visibility issue with serde macros
- Add
FromStrimpl tosha256t::Hash - Fix
Hash::engine()implementation for hash newtypes - Add
sha256t_hash_newtype!macro for creating tagged hashes
- Update MSRV to 1.29.0
- Add
as_innermethod toHashtrait - Add
n_bytes_hashedtoHashEnginetrait
- Support hash newtypes with reversed hex serialization.
- Add
sha256tmodule for SHA-256-based tagged hashes. - Add
FromStrfor hash newtypes. - Add
from_hashfor hash newtypes.
- Add
as_hash(&self) -> <inner>method to hash newtypes.
- Make the inner variable of
sha256::Midstatpublic - Drop the
byteorderdependency in favor of manual endianness implementations (later this will be in stdlib so we can drop even that) - Fix the
hash_newtypemacro, which did not compile before
- Add hash_newtype macro that allows third parties to create newtype structs.
- Add
hex::Errortype for errors generated by thehexmodule.
- Add
no_stdsupport, rearrange traits to not depend onio::Write
- Fix panic when parsing hashes that contain multibyte characters
- Add
FromStrto all hashes which hex-parses them
- Add
from_innermethod to all hashes - Update
FromHextrait to requirefrom_byte_itermethod rather thanfrom_hexbe implemented - Make
Hmacmidstate an actual HMAC midstate - Allow
Displayof truncated hashes - Require using a constructor for
HexIteratorand then clean up the internals - Strongly type
sha256::Midstateto allow independent serialization - Add siphash24 module
- Implement the
FromHextrait on many more types
- Bump minimum required rustc version to 1.22.0
- Fixed serde deserialization into owned string that previously caused panics when doing round-trip (de)serialization
HashEngine::block_size()andHash::len()are now associated constantsHashEngine::BLOCK_SIZEandHash::LEN- Removed
block_size()method fromHashtrait. It is still available as<T as Hash>::Engine::BLOCK_SIZE
- Add a constant-time comparison function
- Simplify
io::Write::writeimplementations by having them do only partial writes - Add fuzzing support
- Allow
Hashes to be borrowed as[u8] - Replace public
Hashinners withinto_innermethod
- Initial release