Sha256: 54e363588a5041eceacdbd75d8e0e9d5e749525c9d0e926730beb54e18d99b88

Contents?: true

Size: 369 Bytes

Versions: 29

Compression:

Stored size: 369 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

class TestEncryption < Minitest::Test
  def test_encryption
    secret = Prefab::Encryption.generate_new_hex_key

    enc = Prefab::Encryption.new(secret)

    clear_text = "hello world"
    encrypted = enc.encrypt(clear_text)
    decrypted = enc.decrypt(encrypted)
    assert_equal clear_text, decrypted
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
prefab-cloud-ruby-1.8.8.pre.1 test/test_encryption.rb
prefab-cloud-ruby-1.8.7 test/test_encryption.rb
prefab-cloud-ruby-1.8.6 test/test_encryption.rb
prefab-cloud-ruby-1.8.5 test/test_encryption.rb
prefab-cloud-ruby-1.8.4 test/test_encryption.rb
prefab-cloud-ruby-1.8.3 test/test_encryption.rb
prefab-cloud-ruby-1.8.2 test/test_encryption.rb
prefab-cloud-ruby-1.8.1 test/test_encryption.rb
prefab-cloud-ruby-1.8.0 test/test_encryption.rb
prefab-cloud-ruby-1.7.2 test/test_encryption.rb
prefab-cloud-ruby-1.7.1 test/test_encryption.rb
prefab-cloud-ruby-1.7.0 test/test_encryption.rb
prefab-cloud-ruby-1.6.2 test/test_encryption.rb
prefab-cloud-ruby-1.6.1 test/test_encryption.rb
prefab-cloud-ruby-1.6.0 test/test_encryption.rb
prefab-cloud-ruby-1.5.1 test/test_encryption.rb
prefab-cloud-ruby-1.6.0.pre2 test/test_encryption.rb
prefab-cloud-ruby-1.6.0.pre1 test/test_encryption.rb
prefab-cloud-ruby-0 test/test_encryption.rb
prefab-cloud-ruby-1.5.0 test/test_encryption.rb