Loading...
Loading...
Generate secure passwords and secrets. Use when: user needs to create secure passwords, API keys, tokens, or cryptographic random strings.
npx skill4agent add winsorllc/upgraded-carnival password-gen# Random 16 char password
openssl rand -base64 16
# Random 20 char alphanumeric
openssl rand -hex 20
# Using /dev/urandom
tr -dc 'A-Za-z0-9' </dev/urandom | head -c 20
# Using pwgen (if installed)
pwgen 16 1# Include special characters
tr -dc 'A-Za-z0-9!@#$%^&*' </dev/urandom | head -c 20
# More secure version
openssl rand -base64 32 | tr -dc 'A-Za-z0-9!@#$%^&*' | head -c 24# Diceware-style (using wordlist)
shuf -n 4 /usr/share/dict/words | tr '\n' '-'
# Using apg (if installed)
apg -a 1 -M Ncl# UUID v4
uuidgen
# Or using Python
python3 -c "import uuid; print(uuid.uuid4())"
# Or using node
node -e "console.log(require('crypto').randomUUID())"# Random token (base64)
openssl rand -base64 32
# Hex token
openssl rand -hex 32# Client secret
openssl rand -base64 32
# 256-bit key
openssl rand -hex 32# SHA-256 hash
echo -n "password" | openssl dgst -sha256
# SHA-512 hash
echo -n "password" | openssl dgst -sha512
# Bcrypt (using htpasswd)
htpasswd -nbBC 10 user password# Random salt (16 bytes hex)
openssl rand -hex 16
# Random salt (16 bytes base64)
openssl rand -base64 16#!/bin/bash
# Generate a secure password
LENGTH="${1:-16}"
CHARS="${2:-A-Za-z0-9!@#$%^&*}"
openssl rand -base64 "$LENGTH" | tr -dc "$CHARS" | head -c "$LENGTH"
echo#!/bin/bash
# Generate API key (prefix_key format)
PREFIX="${1:-sk}"
openssl rand -hex 32 | sed "s/^/${PREFIX}_/"#!/bin/bash
# Generate full set of API credentials
echo "=== API Credentials ==="
echo "Client ID: $(openssl rand -hex 16)"
echo "Client Secret: $(openssl rand -base64 32)"
echo "API Key: sk_$(openssl rand -hex 32)"
echo "JWT Secret: $(openssl rand -base64 32)"
echo ""
echo "=== Database ==="
echo "Password: $(openssl rand -base64 16)"
echo ""
echo "=== Encryption ==="
echo "Key: $(openssl rand -hex 32)"
echo "IV: $(openssl rand -hex 16)"rand()| Task | Command |
|---|---|
| 16-char password | |
| 32-char API key | |
| UUID | |
| Random hex | |
| Random base64 | |