[PR #4894] [CLOSED] Non-interactive Argon2id PHC hash generation #3491

Closed
opened 2026-02-05 05:30:58 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/4894
Author: @buengese
Created: 8/26/2024
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • 4d31ba9 feat: non-interactive Argon2id PHC hash generation

📊 Changes

1 file changed (+34 additions, -17 deletions)

View changed files

📝 src/main.rs (+34 -17)

📄 Description

This is a convenience feature I added mostly for my own sake.

It adds a non interactive way of creating the Agon2id PHC hash from a password which allows for better scriptability of the setup process. While this can technically already be done using the argon2 cli tool, thats still an extra tool that needs to be installed.

This PR just modifies the vaultwarden hash command to check if stdin is a tty and if not will directly read an input password from stdin and output the PHC hash without any confirmation or extra output.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/4894 **Author:** [@buengese](https://github.com/buengese) **Created:** 8/26/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`4d31ba9`](https://github.com/dani-garcia/vaultwarden/commit/4d31ba96ceb63807afd328d0b76b55a3c3028f6f) feat: non-interactive Argon2id PHC hash generation ### 📊 Changes **1 file changed** (+34 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `src/main.rs` (+34 -17) </details> ### 📄 Description This is a convenience feature I added mostly for my own sake. It adds a non interactive way of creating the Agon2id PHC hash from a password which allows for better scriptability of the setup process. While this can technically already be done using the argon2 cli tool, thats still an extra tool that needs to be installed. This PR just modifies the `vaultwarden hash` command to check if stdin is a tty and if not will directly read an input password from stdin and output the PHC hash without any confirmation or extra output. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 05:30:58 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#3491