Update testing/test_hash_token.sh
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user