chore(deps): bump sha2 to 0.11 and rand to 0.10#121
Merged
rubenhensen merged 1 commit intomainfrom Apr 30, 2026
Merged
Conversation
- sha2 0.10 -> 0.11 changes the digest output type so it no longer implements LowerHex; switch compute_hash to use the existing bytes_to_hex helper (same lower-hex output, byte-identical). - rand 0.9 -> 0.10 removes rand::rng().random::<[u8; N]>(); use the top-level rand::random::<[u8; N]>() instead. Drops the now-unused use rand::Rng import. cargo build + cargo test (30 passed) green. Refs encryption4all/dobby#25, #117
rubenhensen
approved these changes
Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two of the major bumps tracked in #117.
What
sha20.10.9→0.11.0rand0.9.2→0.10.0Code changes
compute_hash: sha2 0.11 returns a digest output type that no longer implementsLowerHex, soformat!("{:x}", hash.finalize())no longer compiles. Switched to the existingbytes_to_hexhelper — produces byte-identical lower-hex output.init_cryptify_token: rand 0.10 removesrand::rng().random::<[u8; N]>(). Replaced with the top-levelrand::random::<[u8; N]>(). Dropped the now-unuseduse rand::Rngimport.Verification
cargo buildclean.cargo test: 30 passed, 0 failed (includescompute_hash_is_deterministicandcompute_hash_differs_for_different_tokens, which would catch any hex-encoding regression).Reviewer quickstart
Refs encryption4all/dobby#25, #117.