Update testing/test_hash_token.sh
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 52s
Build-Test-Publish / build (linux/arm64) (push) Successful in 1m12s
Build-Test-Publish / create-manifest (push) Successful in 16s

This commit is contained in:
j842
2025-08-17 13:53:51 +12:00
parent 58a98fff44
commit d48bee63f9

View File

@@ -67,12 +67,12 @@ else
die "Hash does not have correct bcrypt format (should start with \$2b\$)"
fi
# Test 3: Verify hash length (bcrypt hashes are typically 60 characters)
# Test 3: Verify hash length (bcrypt hashes are typically 60-106 characters)
HASH_LENGTH=${#HASH}
if [ $HASH_LENGTH -ge 59 ] && [ $HASH_LENGTH -le 60 ]; then
if [ $HASH_LENGTH -ge 59 ] && [ $HASH_LENGTH -le 106 ]; then
echo "✓ Hash has correct length ($HASH_LENGTH characters)"
else
die "Hash has incorrect length ($HASH_LENGTH characters, expected ~60)"
die "Hash has incorrect length ($HASH_LENGTH characters, expected 60-106)"
fi
# Test 4: Generate multiple hashes for same token and verify they're different