Skip to content

Instantly share code, notes, and snippets.

View Zapotek's full-sized avatar

Tasos Laskos Zapotek

View GitHub Profile
@Zapotek
Zapotek / rsa_aes_cbc.rb
Created May 19, 2011 22:33
RSA_AES_CBC
require 'openssl'
require "yaml"
require "base64"
#
# Simple hybrid crypto class using RSA for public key encryption and AES with CBC
# for bulk data encryption/decryption.
#
# RSA is used to encrypt the AES primitives which are used to encrypt the plaintext.
#
=begin
Arachni
Copyright (c) 2010-2011 Tasos "Zapotek" Laskos <[email protected]>
This is free software; you can copy and distribute and modify
this program under the term of the GPL v2.0 License
(See LICENSE file for details)
=end
#
# Gets the reverse diff (strings that have not changed) between 2 strings
#
#
# text1 = <<END
# This is the first test.
# Not really sure what else to put here...
# END
#
# text2 = <<END