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
Here is a reference to the part of the video where the slides are listed: | |
https://www.youtube.com/watch?v=SrKj4hYic5A&feature=youtu.be&t=28m | |
Here are the references: | |
SMITH - Reflection and Semantics in Lisp - 1983 | |
http://www-public.it-sudparis.eu/~gibson/Teaching/CSC7322/ReadingMaterial/Smith84.pdf | |
WAND & FRIEDMAN - The Mystery of the Tower in Lisp - 1986 | |
http://www.cs.indiana.edu/pub/techreports/TR196.pdf |
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 "digest" | |
def aes128_cbc_encrypt(key, data, iv) | |
key = Digest::MD5.digest(key) if(key.kind_of?(String) && 16 != key.bytesize) | |
iv = Digest::MD5.digest(iv) if(iv.kind_of?(String) && 16 != iv.bytesize) | |
aes = OpenSSL::Cipher.new('AES-128-CBC') | |
aes.encrypt | |
aes.key = key | |
aes.iv = iv |