Method: HexaPDF::Encryption::SecurityHandler::EncryptedStreamData#initialize

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

#initialize(obj, key, algorithm, &error_block) ⇒ EncryptedStreamData

Creates a new encrypted stream data object by utilizing the given stream data object obj as template. The arguments key and algorithm are used for decrypting purposes.



156
157
158
159
160
161
# File 'lib/hexapdf/encryption/security_handler.rb', line 156

def initialize(obj, key, algorithm, &error_block)
  obj.instance_variables.each {|v| instance_variable_set(v, obj.instance_variable_get(v)) }
  @key = key
  @algorithm = algorithm
  @error_block = error_block
end