Bump sha2 and rand; drop rand for getrandom - #20
Merged
Merged
Conversation
Two Dependabot bumps that could not land as lockfile-only changes, taken
together with the call-site work they needed.
sha2 0.11 changed finalize() to return a type that no longer implements
LowerHex, so `format!("{:x}", ..)` stopped compiling. This function's
output IS the stored key_hash — a silently different encoding would
orphan every license row rather than fail a build. The fixed vector test
(sha256("slk_test")) still passes under 0.11, which is the evidence that
the encoding is unchanged, and is exactly why that test exists.
rand 0.10 removed OsRng from `rand::rngs` entirely. Rather than chase it
across another reshuffle, key generation now calls `getrandom::fill`
directly — that is what rand was calling underneath, and for 16 bytes of
key material the shorter, more obviously-correct call is the better
dependency. rand is dropped.
Supersedes the two Dependabot PRs, neither of which could carry a call
site change.
24 tests pass, clippy clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 Dependabot bumps (#18, #19) that couldn't land as lockfile-only changes,
taken together with the call-site work they needed.
sha2 0.11 — the one that mattered
finalize()now returns a type that no longer implementsLowerHex, soformat!("{:x}", ..)stopped compiling.That function's output IS the stored
key_hash. A silently differentencoding would orphan every license row rather than fail a build. The fixed
vector test still passes under 0.11:
That's the evidence the encoding is unchanged — and exactly why the test was
written against a literal
sha256("slk_test")rather than against theimplementation.
rand 0.10 — dropped instead
OsRngis gone fromrand::rngsentirely. Rather than chase it across anotherreshuffle, key generation calls
getrandom::filldirectly — that's what randwas calling underneath, and for 16 bytes of key material the shorter, more
obviously-correct call is the better dependency.
randis removed.24 tests pass, clippy clean. Supersedes #18 and #19.
🤖 Generated with Claude Code