Module: HexaPDF::Encryption::Identity

Defined in:
lib/hexapdf/encryption/identity.rb

Overview

The identity encryption/decryption algorithm.

This “algorithm” does nothing, i.e. it returns the given data as is without encrypting or decrypting it.

See: PDF1.7 s7.6.5

Class Method Summary collapse

Class Method Details

.encrypt(_key, data) ⇒ Object Also known as: decrypt

Just returns the given data.



48
49
50
# File 'lib/hexapdf/encryption/identity.rb', line 48

def encrypt(_key, data)
  data
end

.encryption_fiber(_key, source) ⇒ Object Also known as: decryption_fiber

Just returns the given source fiber.



54
55
56
# File 'lib/hexapdf/encryption/identity.rb', line 54

def encryption_fiber(_key, source)
  source
end