class HexaPDF::Encryption::EncryptionDictionary

See: PDF2.0 s7.6.2
needs further fields it should derive a new subclass and add the new fields there.
Contains entries common to all encryption dictionaries. If a specific security handler
Base class for all encryption dictionaries.

def must_be_indirect?

dictionary.
Returns +true+ because some PDF readers stumble when encountering a non-indirect encryption
def must_be_indirect?
  true
end

def perform_validation

Ensures that the encryption dictionary's content is valid.
def perform_validation
  super
  length = self[:Length]
  if self[:V] == 2 && (!key?(:Length) || length < 40 || length > 128 || length % 8 != 0)
    yield("Invalid value for /Length field when /V is 2", false)
  end
end