Files
Encrypt-Share-Attribution/test_validation_passphrase.txt
T
2026-05-23 07:35:58 -06:00

16 lines
427 B
Plaintext

#!/bin/bash
set -e
attrib_hash=$(cat "./attribution-checksum.sha512")
echo "enter passphrase to test"
read passphrase
echo
tested_hash=$( ( echo -n "$passphrase"; cat "./contents.7z" ) | sha512sum | awk '{print $1}')
if [[ "$attrib_hash" == "$tested_hash" ]]; then
echo -e "Attribution With Password $passphrase: \033[0;32mOK!\033[0m"
else
echo -e "Attribution With Password $passphrase: \033[0;31mFAIL!\033[0m"
fi