Manual do PHP
Anterior |  | Próxima

# HaruDoc::setEncryptionMode

(no version information, might be only in CVS)

HaruDoc::setEncryptionMode -- Set encryption mode for the document

## Descrição

bool HaruDoc::setEncryptionMode ( int mode [, int key_len] )

Defines encryption mode for the document. The encryption mode cannot be set before setting the password.

## Parâmetros

`mode`

  The encryption mode to use. Can be one of the following:

  `HaruDoc::ENCRYPT_R2` - use "revision2" algorithm.
  `HaruDoc::ENCRYPT_R3` - use "revision3" algorithm. Using this value bumps the version of PDF to 1.4.

`key_len`

  The encryption key length in bytes. This parameter is optional and used only when mode is `HaruDoc::ENCRYPT_R3`. The default value is 5 (40bit).

## Valores de retornado

Returns `TRUE` on success.

## Erros/Excessões

Throws HaruException on error.

## Veja também

HaruDoc::setPassword()
HaruDoc::setPermission()

Anterior | Principal | Próxima
HaruDoc::setCurrentEncoder | Acima | HaruDoc::setInfoAttr