#!/usr/bin/env ruby require "openssl" require "base64" key = OpenSSL::Random.random_bytes(32) encoded_key = Base64.encode64(key).chomp # .chomp to remove newline character from encoded key puts "keys: #{encoded_key}"