SecureBlackbox 2020 iOS Edition

Questions / Feedback?

PDFEncryptor Class

Properties   Methods   Events   Configuration Settings   Errors  

The PDFEncryptor class encrypts PDF documents.

Syntax

SecureBlackboxPDFEncryptor
SecureBlackboxPDFEncryptorSwift

Remarks

PDFEncryptor encrypts PDF documents with passwords or certificates.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

- encryptionAlgorithmThe encryption algorithm to encrypt the document with.
- encryptionCertificateBytesReturns raw certificate data in DER format.
- encryptionCertificateCAIndicates whether the certificate has a CA capability (a setting in BasicConstraints extension).
- encryptionCertificateCAKeyIDA unique identifier (fingerprint) of the CA certificate's private key.
- encryptionCertificateCRLDistributionPointsLocations of the CRL (Certificate Revocation List) distribution points used to check this certificate's validity.
- encryptionCertificateCurveSpecifies the elliptic curve of the EC public key.
- encryptionCertificateFingerprintContains the fingerprint (a hash imprint) of this certificate.
- encryptionCertificateFriendlyNameContains an associated alias (friendly name) of the certificate.
- encryptionCertificateHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
- encryptionCertificateHashAlgorithmSpecifies the hash algorithm to be used in the operations on the certificate (such as key signing) SB_HASH_ALGORITHM_SHA1 SHA1 SB_HASH_ALGORITHM_SHA224 SHA224 SB_HASH_ALGORITHM_SHA256 SHA256 SB_HASH_ALGORITHM_SHA384 SHA384 SB_HASH_ALGORITHM_SHA512 SHA512 SB_HASH_ALGORITHM_MD2 MD2 SB_HASH_ALGORITHM_MD4 MD4 SB_HASH_ALGORITHM_MD5 MD5 SB_HASH_ALGORITHM_RIPEMD160 RIPEMD160 SB_HASH_ALGORITHM_CRC32 CRC32 SB_HASH_ALGORITHM_SSL3 SSL3 SB_HASH_ALGORITHM_GOST_R3411_1994 GOST1994 SB_HASH_ALGORITHM_WHIRLPOOL WHIRLPOOL SB_HASH_ALGORITHM_POLY1305 POLY1305 SB_HASH_ALGORITHM_SHA3_224 SHA3_224 SB_HASH_ALGORITHM_SHA3_256 SHA3_256 SB_HASH_ALGORITHM_SHA3_384 SHA3_384 SB_HASH_ALGORITHM_SHA3_512 SHA3_512 SB_HASH_ALGORITHM_BLAKE2S_128 BLAKE2S_128 SB_HASH_ALGORITHM_BLAKE2S_160 BLAKE2S_160 SB_HASH_ALGORITHM_BLAKE2S_224 BLAKE2S_224 SB_HASH_ALGORITHM_BLAKE2S_256 BLAKE2S_256 SB_HASH_ALGORITHM_BLAKE2B_160 BLAKE2B_160 SB_HASH_ALGORITHM_BLAKE2B_256 BLAKE2B_256 SB_HASH_ALGORITHM_BLAKE2B_384 BLAKE2B_384 SB_HASH_ALGORITHM_BLAKE2B_512 BLAKE2B_512 SB_HASH_ALGORITHM_SHAKE_128 SHAKE_128 SB_HASH_ALGORITHM_SHAKE_256 SHAKE_256 SB_HASH_ALGORITHM_SHAKE_128_LEN SHAKE_128_LEN SB_HASH_ALGORITHM_SHAKE_256_LEN SHAKE_256_LEN .
- encryptionCertificateIssuerThe common name of the certificate issuer (CA), typically a company name.
- encryptionCertificateIssuerRDNA collection of information, in the form of [OID, Value] pairs, uniquely identifying the certificate issuer.
- encryptionCertificateKeyAlgorithmSpecifies the public key algorithm of this certificate.
- encryptionCertificateKeyBitsReturns the length of the public key.
- encryptionCertificateKeyFingerprintReturns a fingerprint of the public key contained in the certificate.
- encryptionCertificateKeyUsageIndicates the purposes of the key contained in the certificate, in the form of an OR'ed flag set.
- encryptionCertificateKeyValidReturns True if the certificate's key is cryptographically valid, and False otherwise.
- encryptionCertificateOCSPLocationsLocations of OCSP (Online Certificate Status Protocol) services that can be used to check this certificate's validity, as recorded by the CA.
- encryptionCertificateOriginReturns the origin of this certificate.
- encryptionCertificatePolicyIDsContains identifiers (OIDs) of the applicable certificate policies.
- encryptionCertificatePrivateKeyBytesContains the certificate's private key.
- encryptionCertificatePrivateKeyExistsIndicates whether the certificate has an associated private key.
- encryptionCertificatePrivateKeyExtractableIndicates whether the private key is extractable.
- encryptionCertificatePublicKeyBytesContains the certificate's public key in DER format.
- encryptionCertificateSelfSignedIndicates whether the certificate is self-signed (root) or signed by an external CA.
- encryptionCertificateSerialNumberReturns the certificate's serial number.
- encryptionCertificateSigAlgorithmIndicates the algorithm that was used by the CA to sign this certificate.
- encryptionCertificateSubjectThe common name of the certificate holder, typically an individual's name, a URL, an e-mail address, or a company name.
- encryptionCertificateSubjectKeyIDContains a unique identifier (fingerprint) of the certificate's private key.
- encryptionCertificateSubjectRDNA collection of information, in the form of [OID, Value] pairs, uniquely identifying the certificate holder (subject).
- encryptionCertificateValidFromThe time point at which the certificate becomes valid, in UTC.
- encryptionCertificateValidToThe time point at which the certificate expires, in UTC.
- encryptionCertCountThe number of records in the EncryptionCert arrays.
- encryptionCertBytes:(int)encryptionCertIndexReturns raw certificate data in DER format.
- encryptionCertCA:(int)encryptionCertIndexIndicates whether the certificate has a CA capability (a setting in BasicConstraints extension).
- encryptionCertCAKeyID:(int)encryptionCertIndexA unique identifier (fingerprint) of the CA certificate's private key.
- encryptionCertCRLDistributionPoints:(int)encryptionCertIndexLocations of the CRL (Certificate Revocation List) distribution points used to check this certificate's validity.
- encryptionCertCurve:(int)encryptionCertIndexSpecifies the elliptic curve of the EC public key.
- encryptionCertFingerprint:(int)encryptionCertIndexContains the fingerprint (a hash imprint) of this certificate.
- encryptionCertFriendlyName:(int)encryptionCertIndexContains an associated alias (friendly name) of the certificate.
- encryptionCertHandle:(int)encryptionCertIndexAllows to get or set a 'handle', a unique identifier of the underlying property object.
- encryptionCertHashAlgorithm:(int)encryptionCertIndexSpecifies the hash algorithm to be used in the operations on the certificate (such as key signing) SB_HASH_ALGORITHM_SHA1 SHA1 SB_HASH_ALGORITHM_SHA224 SHA224 SB_HASH_ALGORITHM_SHA256 SHA256 SB_HASH_ALGORITHM_SHA384 SHA384 SB_HASH_ALGORITHM_SHA512 SHA512 SB_HASH_ALGORITHM_MD2 MD2 SB_HASH_ALGORITHM_MD4 MD4 SB_HASH_ALGORITHM_MD5 MD5 SB_HASH_ALGORITHM_RIPEMD160 RIPEMD160 SB_HASH_ALGORITHM_CRC32 CRC32 SB_HASH_ALGORITHM_SSL3 SSL3 SB_HASH_ALGORITHM_GOST_R3411_1994 GOST1994 SB_HASH_ALGORITHM_WHIRLPOOL WHIRLPOOL SB_HASH_ALGORITHM_POLY1305 POLY1305 SB_HASH_ALGORITHM_SHA3_224 SHA3_224 SB_HASH_ALGORITHM_SHA3_256 SHA3_256 SB_HASH_ALGORITHM_SHA3_384 SHA3_384 SB_HASH_ALGORITHM_SHA3_512 SHA3_512 SB_HASH_ALGORITHM_BLAKE2S_128 BLAKE2S_128 SB_HASH_ALGORITHM_BLAKE2S_160 BLAKE2S_160 SB_HASH_ALGORITHM_BLAKE2S_224 BLAKE2S_224 SB_HASH_ALGORITHM_BLAKE2S_256 BLAKE2S_256 SB_HASH_ALGORITHM_BLAKE2B_160 BLAKE2B_160 SB_HASH_ALGORITHM_BLAKE2B_256 BLAKE2B_256 SB_HASH_ALGORITHM_BLAKE2B_384 BLAKE2B_384 SB_HASH_ALGORITHM_BLAKE2B_512 BLAKE2B_512 SB_HASH_ALGORITHM_SHAKE_128 SHAKE_128 SB_HASH_ALGORITHM_SHAKE_256 SHAKE_256 SB_HASH_ALGORITHM_SHAKE_128_LEN SHAKE_128_LEN SB_HASH_ALGORITHM_SHAKE_256_LEN SHAKE_256_LEN .
- encryptionCertIssuer:(int)encryptionCertIndexThe common name of the certificate issuer (CA), typically a company name.
- encryptionCertIssuerRDN:(int)encryptionCertIndexA collection of information, in the form of [OID, Value] pairs, uniquely identifying the certificate issuer.
- encryptionCertKeyAlgorithm:(int)encryptionCertIndexSpecifies the public key algorithm of this certificate.
- encryptionCertKeyBits:(int)encryptionCertIndexReturns the length of the public key.
- encryptionCertKeyFingerprint:(int)encryptionCertIndexReturns a fingerprint of the public key contained in the certificate.
- encryptionCertKeyUsage:(int)encryptionCertIndexIndicates the purposes of the key contained in the certificate, in the form of an OR'ed flag set.
- encryptionCertKeyValid:(int)encryptionCertIndexReturns True if the certificate's key is cryptographically valid, and False otherwise.
- encryptionCertOCSPLocations:(int)encryptionCertIndexLocations of OCSP (Online Certificate Status Protocol) services that can be used to check this certificate's validity, as recorded by the CA.
- encryptionCertOrigin:(int)encryptionCertIndexReturns the origin of this certificate.
- encryptionCertPolicyIDs:(int)encryptionCertIndexContains identifiers (OIDs) of the applicable certificate policies.
- encryptionCertPrivateKeyBytes:(int)encryptionCertIndexContains the certificate's private key.
- encryptionCertPrivateKeyExists:(int)encryptionCertIndexIndicates whether the certificate has an associated private key.
- encryptionCertPrivateKeyExtractable:(int)encryptionCertIndexIndicates whether the private key is extractable.
- encryptionCertPublicKeyBytes:(int)encryptionCertIndexContains the certificate's public key in DER format.
- encryptionCertSelfSigned:(int)encryptionCertIndexIndicates whether the certificate is self-signed (root) or signed by an external CA.
- encryptionCertSerialNumber:(int)encryptionCertIndexReturns the certificate's serial number.
- encryptionCertSigAlgorithm:(int)encryptionCertIndexIndicates the algorithm that was used by the CA to sign this certificate.
- encryptionCertSubject:(int)encryptionCertIndexThe common name of the certificate holder, typically an individual's name, a URL, an e-mail address, or a company name.
- encryptionCertSubjectKeyID:(int)encryptionCertIndexContains a unique identifier (fingerprint) of the certificate's private key.
- encryptionCertSubjectRDN:(int)encryptionCertIndexA collection of information, in the form of [OID, Value] pairs, uniquely identifying the certificate holder (subject).
- encryptionCertValidFrom:(int)encryptionCertIndexThe time point at which the certificate becomes valid, in UTC.
- encryptionCertValidTo:(int)encryptionCertIndexThe time point at which the certificate expires, in UTC.
- encryptionTypeThe encryption type.
- encryptMetadataSpecifies whether to encrypt the document metadata.
- inputBytesUse this property to pass the input to class in the byte array form.
- inputFileThe PDF file to be encrypted.
- outputBytesUse this property to read the output the class object has produced.
- outputFileThe file to save the encrypted document to.
- ownerPasswordThe owner password.
- permsAnnotationsIndicates whether the viewer may add annotations to the document.
- permsAssembleIndicates if the viewer may assemble a new document on the basis of the encrypted one.
- permsExtractIndicates if the user may extract (copy) pictures and text from the encrypted document.
- permsExtractAccIndicates if the user may extract pictures/text from the document for accessibility purposes.
- permsFillInFormsIndicates if the user may fill in forms in the document.
- permsHighQualityPrintIndicates if the document may be printed in high quality.
- permsLowQualityPrintIndicates if the document may be printed in low quality.
- permsModifyIndicates if the document may be modified.
- userPasswordThe user password.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

- configSets or retrieves a configuration setting.
- encryptEncrypts the PDF document.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

- onErrorInformation about errors during encryption.
- onNotificationThis event notifies the application about an underlying control flow event.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

EncryptionHandlerNameSpecifies the custom security handler PDF-name.
HardenedKeyGenerationSpecifies if hardened Key generation should be used.
RC4KeyBitsSpecifies the number of key bits used for RC4 algorithm.
TempPathLocation where the temporary files are stored.
CheckKeyIntegrityBeforeUseEnables or disable private key integrity check before use.
CookieCachingSpecifies whether a cookie cache should be used for HTTP(S) transports.
CookiesGets or sets local cookies for the class (supported for HTTPClient, RESTClient and SOAPClient only).
DefDeriveKeyIterationsSpecifies the default key derivation algorithm iteration count.
EnableClientSideSSLFFDHEEnables or disables finite field DHE key exchange support in TLS clients.
GlobalCookiesGets or sets global cookies for all the HTTP transports.
HttpUserAgentSpecifies the user agent name to be used by all HTTP clients.
LogDestinationSpecifies the debug log destination.
LogDetailsSpecifies the debug log details to dump.
LogFileSpecifies the debug log filename.
LogFiltersSpecifies the debug log filters.
LogFlushModeSpecifies the log flush mode.
LogLevelSpecifies the debug log level.
LogMaxEventCountSpecifies the maximum number of events to cache before further action is taken.
LogRotationModeSpecifies the log rotation mode.
MaxASN1BufferLengthSpecifies the maximal allowed length for ASN.1 primitive tag data.
MaxASN1TreeDepthSpecifies the maximal depth for processed ASN.1 trees.
OCSPHashAlgorithmSpecifies the hash algorithm to be used to identify certificates in OCSP requests.
UseOwnDNSResolverSpecifies whether the client classes should use own DNS resolver.
UseSharedSystemStoragesSpecifies whether the validation engine should use a global per-process copy of the system certificate stores.
UseSystemOAEPAndPSSEnforces or disables the use of system-driven RSA OAEP and PSS computations.
UseSystemRandomEnables or disables the use of the OS PRNG.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 iOS Edition - Version 20.0 [Build 8166]