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'))"