- Docker Compose setup with Traefik integration - Amazon SES SMTP configuration (credentials in .env - not committed) - Email verification and testing scripts - Security: .gitignore excludes sensitive data (.env, data/, emailproxy-config/) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
36 lines
885 B
Python
36 lines
885 B
Python
#!/usr/bin/env python3
|
|
import sys
|
|
try:
|
|
from argon2 import PasswordHasher
|
|
from argon2.low_level import Type
|
|
except ImportError:
|
|
print("Installing argon2-cffi...")
|
|
import subprocess
|
|
subprocess.check_call([sys.executable, "-m", "pip", "install", "argon2-cffi"])
|
|
from argon2 import PasswordHasher
|
|
from argon2.low_level import Type
|
|
|
|
# OWASP preset parameters
|
|
ph = PasswordHasher(
|
|
time_cost=3,
|
|
memory_cost=65536,
|
|
parallelism=4,
|
|
hash_len=32,
|
|
salt_len=16,
|
|
type=Type.ID
|
|
)
|
|
|
|
token = "gOvhQKzn47nfapPN6bDduFIM+HHYaIPu32n7/R/CjLZjfGFl1vUidpLByX1eu67s"
|
|
hash_result = ph.hash(token)
|
|
|
|
# Replace $ with $$ for .env file format
|
|
env_hash = hash_result.replace('$', '$$')
|
|
|
|
print("Argon2id hash generated successfully!")
|
|
print()
|
|
print("For .env file (with escaped $$):")
|
|
print(env_hash)
|
|
print()
|
|
print("For config.json (no escaping):")
|
|
print(hash_result)
|