Foxit PDF SDK for HarmonyOS  3.0
CertificateSecurityHandler Class Reference
Inheritance diagram for CertificateSecurityHandler:
SecurityHandler NativeObjectWrapper

Public Member Functions

 constructor ()
 Constructor.
 
 constructor (r)
 
 Initialize (encrypt_data, encrypt_key)
 Initialize current certificate security handler. More...
 
 Initialize (envelopes, cipher, is_encrypt_metadata)
 Initialize current certificate security handler. More...
 
- Public Member Functions inherited from SecurityHandler
 constructor ()
 Constructor.
 
 constructor (r)
 
 GetSecurityType ()
 Get the encryption type of current security handler. More...
 
 IsEmpty ()
 Check whether current object is empty or not. More...
 
- Public Member Functions inherited from NativeObjectWrapper
 constructor (r)
 
 GetPointerAsNumber ()
 

Additional Inherited Members

- Static Public Attributes inherited from SecurityHandler
static e_CipherAES
 Use AES encryption algorithm, with the key length be 16 bytes (as AES-128) or 32 bytes (as AES-256, only supported in PDF 2.0).
 
static e_CipherNone
 Enumeration for Encryption Algorithm. More...
 
static e_CipherRC4
 Use RC4 encryption algorithm, with the key length between 5 bytes and 16 bytes.
 

Detailed Description

This class represents a certificate security handler, used for certificate encryption.

See also
SecurityHandler
Examples
/Users/ec2-user/gitlab-runner/builds/E-xKdhDoq/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

Member Function Documentation

◆ constructor()

CertificateSecurityHandler.constructor ( )

@constructor

Parameters
{NativeObjectReference}r - The native object reference to wrap

@description Creates a new wrapper instance around a native C++ object. The wrapper manages the object's lifecycle according to the ownership rules.

◆ Initialize() [1/2]

CertificateSecurityHandler.Initialize ( encrypt_data  ,
encrypt_key   
)

Initialize current certificate security handler.

Parameters
[in]encrypt_dataA certificate encrypt data object. In the encryption data, cipher type should not be SecurityHandler.e_CipherNone.
[in]encrypt_keyThe key for encryption.
For SecurityHandler.e_CipherRC4 cipher, the length of encryption key should be between 5 and 16. For SecurityHandler.e_CipherAES cipher, the length of encryption key should be 16 or 32.
Returns
true means success, while false means failure.

◆ Initialize() [2/2]

CertificateSecurityHandler.Initialize ( envelopes  ,
cipher  ,
is_encrypt_metadata   
)

Initialize current certificate security handler.

Parameters
[in]envelopesAn array of envelopes.
[in]cipherCipher type. Please refer to values starting from SecurityHandler.e_CipherRC4 and this should be one of these values except SecurityHandler.e_CipherNone.
[in]is_encrypt_metadatatrue means to encrypt metadata, and false means not to encrypt metadata.
Returns
true means success, while false means failure.
Examples
/Users/ec2-user/gitlab-runner/builds/E-xKdhDoq/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.