Skip to content

Bump sha2 to 0.11 and stop relying on LowerHex - #15

Merged
Sbussiso merged 1 commit into
masterfrom
deps/sha2-0.11
Sep 14, 2026
Merged

Sbussiso merged 1 commit into
masterfrom
deps/sha2-0.11

Conversation

@Sbussiso

Copy link
Copy Markdown
Contributor

Dependabot's bump (#14) failed to compile:

error[E0277]: the trait bound `Array<u8, ...>: LowerHex` is not satisfied
  --> src/entitlements.rs:73:25
   |
73 |         format!("{:x}", hasher.finalize())

sha2 0.11 changed finalize() to return a type that no longer implements
LowerHex. The fix is to write the hex encoding out rather than lean on a
trait impl the crate is free to change.

Worth noting the compiler caught this. The same shorthand produces the
stored key_hash in Sentinel-License-Service — a silently different
encoding there would orphan every license row rather than fail the build. That
service pins its hashing to a fixed vector (sha256("slk_test")) for exactly
this reason.

Supersedes #14, which couldn't carry the call-site change.

🤖 Generated with Claude Code

Dependabot's bump failed to compile: sha2 0.11 changed finalize() to
return a type that no longer implements LowerHex, so
`format!("{:x}", hasher.finalize())` stopped building.

The fix is to write the hex encoding out rather than lean on a trait impl
that the crate is free to change. Worth noting the compiler caught this —
the same shorthand produces the STORED key_hash in
Sentinel-License-Service, where a silently different encoding would
orphan every license row instead of failing the build.

Supersedes the Dependabot PR, which could not carry the call-site change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Sbussiso
Sbussiso merged commit bf8ca37 into master Sep 14, 2026
5 checks passed
@Sbussiso
Sbussiso deleted the deps/sha2-0.11 branch September 14, 2026 09:39
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