Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncate secret hash #722

Merged
merged 2 commits into from
Aug 25, 2024

Commits on Aug 22, 2024

  1. Remove bitcoin_hashes range dependency

    In order correctly truncate the secret data we need to use recent
    version of `bitcoin_hashes`.
    
    Remove the range dependency and update the lock files.
    tcharding committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    4b143d6 View commit details
    Browse the repository at this point in the history
  2. Truncate secret hash using precision

    Currently we are attempting to truncate the hash created using
    `bitcoin_hashes` by using the "width" formatting parameter instead of
    the "precision" parameter. `hex-conservative` truncates with the
    "precision" parameter as is expected since a hash is not an integral
    type.
    
    Use the formatting string `"{:.16}"` which is the "precision"
    formatting parameter.
    tcharding committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    3d1ce0d View commit details
    Browse the repository at this point in the history