The compute_digest method currently does not return a Result<>, and thus is not allowed to error. This is not a problem for the built in providers, however third party ones may need to throw an error, and must currently unwrap. This function should be changed to return a Result.
The Algorithm enum should also be made #[non_exhaustive], so that when algorithms are added in the future, third party providers continue to compile (and can panic via unimplemented!() instead).
Both changes are breaking.
The
compute_digestmethod currently does not return aResult<>, and thus is not allowed to error. This is not a problem for the built in providers, however third party ones may need to throw an error, and must currently unwrap. This function should be changed to return aResult.The Algorithm enum should also be made
#[non_exhaustive], so that when algorithms are added in the future, third party providers continue to compile (and can panic viaunimplemented!()instead).Both changes are breaking.