PGPReader Class
Properties Methods Events Configuration Settings Errors
The PGPReader class reads and unprotects protected PGP files.
Syntax
class secureblackbox.PGPReader
Remarks
PGPReader allows you to parse PGP messages and manipulate PGP-secured data. It decrypts the protected data, decompresses it, verifies signatures, and returns "clear" data.
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
armored | Indicates if the processed message had been base64-armored. |
compressed | Indicates if the processed message had been compressed. |
decrypting_key_count | The number of records in the DecryptingKey arrays. |
decrypting_key_handle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
decrypting_key_key_fp | The 20-byte fingerprint (hash value) of this key. |
decrypting_key_key_id | Contains a 8-byte key identifier. |
decrypting_key_passphrase | The key protection password. |
decrypting_key_passphrase_valid | Use this property to check whether the specified Passphrase is valid and can be used to unlock the secret key. |
decrypting_key_username | Specifies the name of the user bound to this key. |
external_crypto_custom_params | Custom parameters to be passed to the signing service (uninterpreted). |
external_crypto_data | Additional data to be included in the async state and mirrored back by the requestor. |
external_crypto_external_hash_calculation | Specifies whether the message hash is to be calculated at the external endpoint. |
external_crypto_hash_algorithm | Specifies the request's signature hash algorithm. |
external_crypto_key_id | The ID of the pre-shared key used for DC request authentication. |
external_crypto_key_secret | The pre-shared key used for DC request authentication. |
external_crypto_method | Specifies the asynchronous signing method. |
external_crypto_mode | Specifies the external cryptography mode. |
external_crypto_public_key_algorithm | Provide public key algorithm here if the certificate is not available on the pre-signing stage. |
key_passphrase | Specifies a passphrase for the decryption key. |
passphrase | Specifies a message decryption password. |
processed_length | Reports the number of bytes processed. |
profile | Specifies a pre-defined profile to apply when creating the signature. |
signature_count | The number of records in the Signature arrays. |
signature_certification_type | Specifies the type of a UserID signature. |
signature_creation_time | The time when the signature was created, in Universal Coordinated Time (UTC). |
signature_expiration_time | Specifies signature expiration time, in seconds since its creation time (CreationTime). |
signature_exportable | Specifies whether a certification signature is "exportable", meaning it can be used by entities other than the signature's issuer. |
signature_handle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
signature_hash_algorithm | Specifies the hash algorithm used in the signature. |
signature_key_expiration_time | The number of seconds after which the signed key will expire. |
signature_legacy_format | Indicates whether signature uses PGP 2. |
signature_policy_url | Contains the URL of the signature policy. |
signature_primary_user_id | Indicates whether the UserID covered by the signature is the main user id for this key. |
signature_reason_for_revocation | Describes the reason why the key or the certificate was revoked. |
signature_revocable | Specifies whether the signature can be revoked. |
signature_revocation | Indicates whether or not the signature is a revocation signature. |
signature_signature_class | Indicates the signature class. |
signature_signer_key_id | Indicates the KeyID of the signing key. |
signature_signer_user_id | Indicates the UserID associated with the signing key. |
signature_strictly_valid | Returns True if this signature is valid in a strict way (no compatibility relaxations). |
signature_text_signature | Indicates whether or not the signature is made over a text document. |
signature_trust_amount | Specifies the amount of trust assigned by this signature. |
signature_trust_level | The trust level assigned by this signature. |
signature_validated | Whether the signature has been validated. |
signature_validity | Provides the validity status of the signature if the signature has been validated. |
signature_version | Indicates the signature version. |
verifying_key_count | The number of records in the VerifyingKey arrays. |
verifying_key_handle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
verifying_key_key_fp | The 20-byte fingerprint (hash value) of this key. |
verifying_key_key_id | Contains a 8-byte key identifier. |
verifying_key_username | Specifies the name of the user bound to this key. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
config | Sets or retrieves a configuration setting. |
decrypt_and_verify | Decrypts and verifies a protected message. |
decrypt_and_verify_file | Decrypts and verifies a protected message. |
decrypt_and_verify_string | Decrypts and verifies a protected message. |
verify_detached | Verifies a detached signature. |
verify_detached_file | Verifies a detached signature. |
verify_detached_string | Verifies a detached signature. |
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.
on_encryption_info | Reports early information on encryption parameters. |
on_error | Information about errors during PGP decryption/verification. |
on_external_decrypt | Handles remote or external decryption. |
on_file_extraction_start | Reports the beginning of file extraction process. |
on_key_passphrase_needed | Requests a key protection password from the application. |
on_multiple_files_found | Fires if the PGP message is recognized to contain multiple files. |
on_notification | This event notifies the application about an underlying control flow event. |
on_passphrase_needed | Requests a data protection password from the application. |
on_progress | Reports the progress of the decryption operation. |
on_signed | Notifies the application about a signed message. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
IgnoreDataPacketLengths | Whether to check the length of input data packets. |
PasswordAttempts | The number of attempts allowed for entering password. |
TempPath | Path for storing temporary files. |
UndefInputLength | Set this property if you are working with non-seekable streams. |
UseGreedyMemoryConsumption | Whether to limit memory consumption for the cost of speed. |
CheckKeyIntegrityBeforeUse | Enables or disable private key integrity check before use. |
CookieCaching | Specifies whether a cookie cache should be used for HTTP(S) transports. |
Cookies | Gets or sets local cookies for the class (supported for HTTPClient, RESTClient and SOAPClient only). |
DefDeriveKeyIterations | Specifies the default key derivation algorithm iteration count. |
EnableClientSideSSLFFDHE | Enables or disables finite field DHE key exchange support in TLS clients. |
GlobalCookies | Gets or sets global cookies for all the HTTP transports. |
HttpUserAgent | Specifies the user agent name to be used by all HTTP clients. |
LogDestination | Specifies the debug log destination. |
LogDetails | Specifies the debug log details to dump. |
LogFile | Specifies the debug log filename. |
LogFilters | Specifies the debug log filters. |
LogFlushMode | Specifies the log flush mode. |
LogLevel | Specifies the debug log level. |
LogMaxEventCount | Specifies the maximum number of events to cache before further action is taken. |
LogRotationMode | Specifies the log rotation mode. |
MaxASN1BufferLength | Specifies the maximal allowed length for ASN.1 primitive tag data. |
MaxASN1TreeDepth | Specifies the maximal depth for processed ASN.1 trees. |
OCSPHashAlgorithm | Specifies the hash algorithm to be used to identify certificates in OCSP requests. |
UseOwnDNSResolver | Specifies whether the client classes should use own DNS resolver. |
UseSharedSystemStorages | Specifies whether the validation engine should use a global per-process copy of the system certificate stores. |
UseSystemOAEPAndPSS | Enforces or disables the use of system-driven RSA OAEP and PSS computations. |
UseSystemRandom | Enables or disables the use of the OS PRNG. |