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: PDF2.0 s7.6.6

Class Method Summary collapse

Class Method Details

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

Just returns the given data.



51
52
53
# File 'lib/hexapdf/encryption/identity.rb', line 51

def encrypt(_key, data)
  data
end

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

Just returns the given source fiber.



57
58
59
# File 'lib/hexapdf/encryption/identity.rb', line 57

def encryption_fiber(_key, source)
  source
end