RustCrypto / RustCrypto/password-hashes

Inconsistency between `hash_into` function names

Open
#462 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
909
Forks
115
Avg merge
1d 6h
Merged PRs (30d)
4

Description

There's multiple differently named functions that all do the same thing - hash a password into a buffer:

  • argon2: .hash_password_into()
  • balloon-hash: .hash_into()
  • bcrypt-pbkdf: .finalize_into() (this one is understandable as it can be incremental)
  • scrypt: it's the only option available, via scrypt()
  • sha-crypt: does not provide the functionality at all

I personally think the easiest solution would be to rename balloon-hash' .hash_into() into .hash_password_into(), and although it'd be a breaking change it would unify the function names a little more.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the balloon-hash hash_into() entry point and checking its callers and public API references. Compare the surrounding password-hashing APIs named in the issue, then verify that the renamed interface and its affected references build successfully without changing hashing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cryptography, security
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.