Created
January 8, 2018 18:33
-
-
Save eprothro/55fb98feee31757382ed24ac0fd8b04e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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