base64upgraded to 0.22
ringupgraded to 0.17.0base64upgraded- Support Rust 2021 edition
- Hide base64::DecodeError
-
The cryptography library used is now configurable.
- By default
ringis used (theuse_ringfeature). - You can use the
use_opensslfeature to use openssl instead- e.g. in your Cargo.toml:
[dependencies.hawk] version = "..." features = ["use_openssl"] default-features = false
- You can use neither and provide your own implementation using the functions in
hawk::cryptoif neither feature is enabled. - Note that enabling both
use_ringanduse_opensslwill cause a build failure.
- By default
-
BREAKING: Many functions that previously returned
Tnow returnhawk::Result<T>.- Specifically,
PayloadHasher::{hash,update,finish},Key::{new,sign}.
- Specifically,
-
BREAKING:
hawk::SHA{256,384,512}are nowconstDigestAlgorithms and not aliases forring::Algorithm -
BREAKING:
Key::newnow takes aDigestAlgorithmand not a&'static ring::Algorithm.- If you were passing e.g.
&hawk::SHA256, you probably just need to passhawk::SHA256now instead.
- If you were passing e.g.
-
BREAKING (though unlikely):
Error::Rnghas been removed, andError::Cryptoadded