Skip to content

Instantly share code, notes, and snippets.

View ntnmrndn's full-sized avatar

Marandon Antoine ntnmrndn

View GitHub Profile
@dirtyhenry
dirtyhenry / poc-openssl-aes.rb
Last active June 5, 2018 11:48
Encryption interoperability demo between Ruby and OpenSSL
require 'openssl'
require 'base64'
# Read the dummy file
data = File.read("test.txt")
# Create an encrypter
cipher = OpenSSL::Cipher::AES.new(256, :CBC)
cipher.encrypt
key = cipher.random_key