Skip to content

Instantly share code, notes, and snippets.

@wilmoore
Last active June 8, 2024 00:35
Show Gist options
  • Select an option

  • Save wilmoore/7601d6fd741ce61b4da8ea85829de20d to your computer and use it in GitHub Desktop.

Select an option

Save wilmoore/7601d6fd741ce61b4da8ea85829de20d to your computer and use it in GitHub Desktop.
Software Engineering :: Security :: Cryptography :: Protocol :: SSL/TLS :: OpenSSL :: Examples

Software Engineering :: Security :: Cryptography :: Protocol :: SSL/TLS :: OpenSSL :: Examples

⪼ Made with 💜 by Polyglot.

OpenSSL Examples

Generate a 16-byte (128-bit) random password encoded in base64

openssl rand -base64 16

Generate Password Encryption Keys

For storing user password encrypted at rest with base64 hashing so it can be passed around as plain text

Fish Shell
set -x TENANT_PASSWORD_ENCRYPTION_KEY (openssl rand -hex 16|cut -c1-31|base64)
Bash Shell
export TENANT_PASSWORD_ENCRYPTION_KEY=$(openssl rand -hex 16|cut -c1-31|base64)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment