public HPDF_STATUS setEncryptionMode(
    HaruEncryptMode mode, 
    uint keyLen)

Set the encryption mode. As the side effect, ups the version of PDF to 1.4 when the mode is set to HaruEncryptMode.R3

Parameters

  • One of the following:

  • HaruEncryptMode.R2 = Use "Revision 2" algorithm. "keylen" automatically set to 5 (40 bits).</li> <li>HaruEncryptMode.R3 = Use "Revision 3" algorithm. "keylen" can be 5 (40 bits) to 16 (128bits).
  • key_len = Specify the byte length of encryption key. Only valid for HaruEncryptMode.R3. Between 5 (40 bits) and 16 (128 bits) can be specified