Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
require 'openssl'
require 'base64'
cipher = OpenSSL::Cipher::Cipher.new("aes-256-cbc")
key = cipher.random_key
value = Base64.strict_encode64(key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.