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

Version Path
arachni-1.2.1 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-1.2 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-1.1 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-1.0.6 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-1.0.5 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-1.0.4 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-1.0.3 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-1.0.2 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-1.0.1 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-1.0 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-0.4.7 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-0.4.6 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-0.4.5.2 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-0.4.5.1 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-0.4.5 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-0.4.4 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-0.4.3.2 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-0.4.3.1 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb
arachni-0.4.3 spec/arachni/support/crypto/rsa_aes_cbc_spec.rb