Sha256: 12ed7cd34a1419e47f3732b1de4443e4dddf88073d13f198d85f591a981141bd

Contents?: true

Size: 568 Bytes

Versions: 6

Compression:

Stored size: 568 Bytes

Contents

# -*- encoding: utf-8 -*-

require_relative 'common'
require 'hexapdf/encryption/identity'

describe HexaPDF::Encryption::Identity do
  include EncryptionAlgorithmInterfaceTests

  before do
    @algorithm_class = HexaPDF::Encryption::Identity
  end

  it "returns the data unmodified for encrypt/decrypt" do
    assert_equal('data', @algorithm_class.encrypt('key', 'data'))
  end

  it "returns the source Fiber unmodified for encryption_fiber/decryption_fiber" do
    f = Fiber.new {'data'}
    assert_equal(f, @algorithm_class.encryption_fiber('key', f))
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hexapdf-0.6.0 test/hexapdf/encryption/test_identity.rb
hexapdf-0.5.0 test/hexapdf/encryption/test_identity.rb
hexapdf-0.4.0 test/hexapdf/encryption/test_identity.rb
hexapdf-0.3.0 test/hexapdf/encryption/test_identity.rb
hexapdf-0.2.0 test/hexapdf/encryption/test_identity.rb
hexapdf-0.1.0 test/hexapdf/encryption/test_identity.rb