Module: HexaPDF::Filter::Encryption
- Defined in:
- lib/hexapdf/filter/encryption.rb
Overview
This filter module allows access to the standard encryption and decryption routines implemented by the SecurityHandler using the standard Filter interface.
The options
hash for ::decoder and ::encoder must contain two keys: :key (the encryption/decryption key) and :algorithm (the class used for encrypting/decrypting).
This module must not be confused with the Crypt filter specified in the PDF specification!
Class Method Summary collapse
-
.decoder(source, options) ⇒ Object
See HexaPDF::Filter.
-
.encoder(source, options) ⇒ Object
See HexaPDF::Filter.
Class Method Details
.decoder(source, options) ⇒ Object
See HexaPDF::Filter
50 51 52 |
# File 'lib/hexapdf/filter/encryption.rb', line 50 def self.decoder(source, ) [:algorithm].decryption_fiber([:key], source) end |
.encoder(source, options) ⇒ Object
See HexaPDF::Filter
55 56 57 |
# File 'lib/hexapdf/filter/encryption.rb', line 55 def self.encoder(source, ) [:algorithm].encryption_fiber([:key], source) end |