Generate a strong random secret

Bash

For session keys and tokens. Never reach for a password generator or a UUID for this.

openssl rand -base64 48

# Hex, and without the base64 padding characters:
openssl rand -hex 32
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

More in Security

Random picks