Sha256: 03930e4e793abda0243fd40b9f6fedd872ddb3cc86166fe1726cef5170cf1139
Contents?: true
Size: 524 Bytes
Versions: 9
Compression:
Stored size: 524 Bytes
Contents
require 'test_helper' class CryptTest < ActiveSupport::TestCase setup do @crypt = QuoVadis::Crypt end test 'round trip' do plaintext = 'the quick brown fox' ciphertext = @crypt.encrypt plaintext refute_equal plaintext, ciphertext assert_equal plaintext, @crypt.decrypt(ciphertext) end test 'same plaintext encrypts to different ciphertexts' do plaintext = 'the quick brown fox' ciphertext = @crypt.encrypt plaintext refute_equal ciphertext, @crypt.encrypt(plaintext) end end
Version data entries
9 entries across 9 versions & 1 rubygems