Non-interactive Argon2id PHC hash generation #965

Closed
opened 2026-04-06 01:21:17 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @buengese on 8/25/2024

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.

*Originally created by @buengese on 8/25/2024* 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.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#965