Skip to content

feat: parse and display verity salts - #31

Merged
npmccallum merged 1 commit into
mainfrom
feat/salt-hex-traits
Nov 20, 2026
Merged

npmccallum merged 1 commit into
mainfrom
feat/salt-hex-traits

Conversation

@npmccallum

@npmccallum npmccallum commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Add hexadecimal Display and FromStr to the existing bounded Salt type. Parsing checks for an even encoded length of at most 512 bytes before a single-match half() helper decodes directly into the fixed array. Display emits lowercase hex; parsing accepts either case and the existing empty salt.

No dependency is added. Carapace's parent-prefix rules remain separate from this generic 0–256-byte salt type.

Validation: all eight minimal-feature verity library tests pass, including every-byte round trips and malformed/oversized input; minimal-feature Clippy, formatting and diff checks pass. One commit changes one file by 76 lines. All ten jobs in exact-head CI passed on 42361b9, including Windows, macOS, kernel and MSRV checks. Direct independent review of this exact head found no actionable findings. The reviewer inspected source and verified CI; no tests or coverage were assessed by the reviewer.

Expose hexadecimal conversion on the existing bounded salt type.
Check encoded length before decoding into fixed storage, using a
small half-byte match without adding a dependency.
@npmccallum
npmccallum merged commit 8cd1d6c into main Nov 20, 2026
10 checks passed
@npmccallum
npmccallum deleted the feat/salt-hex-traits branch November 20, 2026 18:46
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