tvl-depot/tools/hash-password.nix
Vincent Ambo 29984bb6f9 feat(tools/hash-password): Add a wrapper script for slappasswd
This wrapper script correctly invokes slappasswd for generating ARGON2
hashes.

People without Nix will need to figure this out on their own.

Change-Id: I264715ba4932855b868bef70cc9102515b3d129e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/833
Tested-by: BuildkiteCI
Reviewed-by: BuildkiteCI
Reviewed-by: Kane York <rikingcoding@gmail.com>
2020-07-01 20:39:07 +00:00

7 lines
235 B
Nix

# Utility for invoking slappasswd with the correct options for
# creating an ARGON2 password hash.
{ pkgs, ... }:
pkgs.writeShellScriptBin "hash-password" ''
${pkgs.openldap}/bin/slappasswd -o module-load=pw-argon2 -h '{ARGON2}'
''