From ed26939af4c0d326548ba91b5eef9a90ec51a3fb Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Sat, 13 Jun 2026 11:30:11 -0600 Subject: [PATCH] 1781371811 --- customscripts/hash_cred_check.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 customscripts/hash_cred_check.sh diff --git a/customscripts/hash_cred_check.sh b/customscripts/hash_cred_check.sh new file mode 100644 index 0000000..00f63ef --- /dev/null +++ b/customscripts/hash_cred_check.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -e # we do noot tolerate failure here + +# aint got no time for no bs +if [ -z "$1" ]; then + echo -e "ERROR\nUsage: hash_cred_check.sh " + exit 1 # fail with error +fi + +# 256 bits of random shit, encoded as base64 +salt="$(openssl rand -base64 32)" + +# set credential +credential="$1" + +# output hex bytes after doi one hell of a argon2id fuckery +hash=$(echo -n "$credential" | argon2 "$(base64 -d <<< $salt)" -id -t 8 -m 19 -p 2 -r) + +echo "$hash" +echo "$salt" \ No newline at end of file