class HexaPDF::Encryption::StandardSecurityHandler::EncryptionOptions

def process_permissions(perms)

See: PDF2.0 s7.6.4.2, ADB1.7 3.5.2 (table 3.20 and the paragraphs before)

Maps the permissions to an integer for use by the standard security handler.
def process_permissions(perms)
  if perms.kind_of?(Array)
    perms = perms.inject(0) do |result, perm|
      result | Permissions::SYMBOL_TO_PERMISSION.fetch(perm, 0)
    end
  end
  ((Permissions::RESERVED | perms) & 0xFFFFFFFC) - 2**32
end