class HexaPDF::Encryption::SecurityHandler::EncryptedStreamData
Provides additional encryption specific information for HexaPDF::StreamData
objects.
Attributes
algorithm[R]
The encryption algorithm.
key[R]
The encryption key.
Public Class Methods
new(obj, key, algorithm)
click to toggle source
Creates a new encrypted stream data object by utilizing the given stream data object as template. The arguments key
and algorithm
are used for decrypting purposes.
# File lib/hexapdf/encryption/security_handler.rb, line 155 def initialize(obj, key, algorithm) obj.instance_variables.each {|v| instance_variable_set(v, obj.instance_variable_get(v)) } @key = key @algorithm = algorithm end
Public Instance Methods
fiber(*args)
click to toggle source
Returns a fiber like HexaPDF::StreamData#fiber
, but one wrapped in a decrypting fiber.
Calls superclass method
# File lib/hexapdf/encryption/security_handler.rb, line 164 def fiber(*args) @algorithm.decryption_fiber(@key, super(*args)) end
Also aliased as: undecrypted_fiber