Method: HexaPDF::Encryption::RubyAES#initialize

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

#initialize(key, iv, mode) ⇒ RubyAES

Creates a new AES object using the given encryption key and initialization vector.

The mode must either be :encrypt or :decrypt.



62
63
64
65
66
67
# File 'lib/hexapdf/encryption/ruby_aes.rb', line 62

def initialize(key, iv, mode)
  @key = key
  @expanded_key_blocks = expand_key(@key)
  @prev_block = iv.bytes
  @mode = mode
end