Skip to content

chore(deps): bump sha2 to 0.11 and rand to 0.10#121

Merged
rubenhensen merged 1 commit intomainfrom
dobby/sha2-rand
Apr 30, 2026
Merged

chore(deps): bump sha2 to 0.11 and rand to 0.10#121
rubenhensen merged 1 commit intomainfrom
dobby/sha2-rand

Conversation

@dobby-coder
Copy link
Copy Markdown
Contributor

@dobby-coder dobby-coder Bot commented Apr 28, 2026

Two of the major bumps tracked in #117.

What

  • sha2 0.10.90.11.0
  • rand 0.9.20.10.0

Code changes

  • compute_hash: sha2 0.11 returns a digest output type that no longer implements LowerHex, so format!("{:x}", hash.finalize()) no longer compiles. Switched to the existing bytes_to_hex helper — produces byte-identical lower-hex output.
  • init_cryptify_token: rand 0.10 removes rand::rng().random::<[u8; N]>(). Replaced with the top-level rand::random::<[u8; N]>(). Dropped the now-unused use rand::Rng import.

Verification

  • cargo build clean.
  • cargo test: 30 passed, 0 failed (includes compute_hash_is_deterministic and compute_hash_differs_for_different_tokens, which would catch any hex-encoding regression).

Reviewer quickstart

git fetch origin && git checkout dobby/sha2-rand && cargo build && cargo test

Refs encryption4all/dobby#25, #117.

- 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 rubenhensen marked this pull request as ready for review April 30, 2026 19:24
@rubenhensen rubenhensen merged commit bcc990c into main Apr 30, 2026
5 checks passed
@rubenhensen rubenhensen deleted the dobby/sha2-rand branch April 30, 2026 19:24
@github-actions github-actions Bot mentioned this pull request Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant