RubyでAESの暗号化を行うサンプル

rubyコード:
#gem install fast-aes

require 'rubygems’
require 'fast-aes’

# key can be 128, 192, or 256 bits
key = ’42#3b%c$dxyT,7a5=+5fUI3fa7352&^:’

aes = FastAES.new(key)

text = “Hey there, how are you?"

data = aes.encrypt(text)

puts aes.decrypt(data) # “Hey there, how are you?"

Ruby

Posted by arkgame