Sha256: 524183469c8157f2d68a7eb0d0859495b2e71c80c3fd566338f821a4e33bb737
Contents?: true
Size: 870 Bytes
Versions: 19
Compression:
Stored size: 870 Bytes
Contents
require 'spec_helper' require 'tempfile' describe Arachni::Support::Crypto::RSA_AES_CBC do SEED = 'seed data' before :all do private_key_file = Tempfile.new( 'private_key.pem' ) private_key = OpenSSL::PKey::RSA.generate( 1024 ) private_key_file.write( private_key.to_pem ) private_key_file.close public_key = private_key.public_key public_key_file = Tempfile.new( 'public_key.pem' ) public_key_file.write( public_key.to_pem ) public_key_file.close @private_key_file_path = private_key_file.path @public_key_file_path = public_key_file.path @crypto = described_class.new( @public_key_file_path, @private_key_file_path ) end it 'generates matching encrypted and decrypted data' do @crypto.decrypt( @crypto.encrypt( SEED ) ).should == SEED end end
Version data entries
19 entries across 19 versions & 1 rubygems