Sha256: 686beb1deb2b3eb82d053a5c223b5cc1536a99b2a1ea31c1e3e9b6988d5d24fc
Contents?: true
Size: 594 Bytes
Versions: 8
Compression:
Stored size: 594 Bytes
Contents
require 'spec_helper' describe 'Encryption::Asymmetric' do before(:each) do @string = String.random keypair = Encryption::Keypair.new @public_key = keypair.public_key @private_key = keypair.private_key end it 'should encrypt with public key and then decrypt with private key' do encrypted = @public_key.encrypt(@string) @private_key.decrypt(encrypted).should == @string end it 'should encrypt with private key and then decrypt with public key' do encrypted = @private_key.encrypt(@string) @public_key.decrypt(encrypted).should == @string end end
Version data entries
8 entries across 8 versions & 1 rubygems