SecureBlackbox 2020 Python Edition

Questions / Feedback?

PGPWriter Class

Properties   Methods   Events   Configuration Settings   Errors  

The PGPWriter class protects data using PGP keys and certificates.

Syntax

class secureblackbox.PGPWriter

Remarks

PGPWriter allows you to encrypt, sign, armor, and compress the input 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.

armorSpecifies whether the data should be armored.
armor_boundaryA boundary to put around the base64 armor.
armor_headersAdditional headers to include with the armored message.
compressWhether to compress the data before encrypting it.
compression_algorithmThe compression algorithm to use.
compression_levelThe compression level to use.
encrypting_key_countThe number of records in the EncryptingKey arrays.
encrypting_key_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
encrypting_key_key_fpThe 20-byte fingerprint (hash value) of this key.
encrypting_key_key_idContains a 8-byte key identifier.
encrypting_key_usernameSpecifies the name of the user bound to this key.
encryption_algorithmA symmetric algorithm to use for data encryption.
external_crypto_custom_paramsCustom parameters to be passed to the signing service (uninterpreted).
external_crypto_dataAdditional data to be included in the async state and mirrored back by the requestor.
external_crypto_external_hash_calculationSpecifies whether the message hash is to be calculated at the external endpoint.
external_crypto_hash_algorithmSpecifies the request's signature hash algorithm.
external_crypto_key_idThe ID of the pre-shared key used for DC request authentication.
external_crypto_key_secretThe pre-shared key used for DC request authentication.
external_crypto_methodSpecifies the asynchronous signing method.
external_crypto_modeSpecifies the external cryptography mode.
external_crypto_public_key_algorithmProvide public key algorithm here if the certificate is not available on the pre-signing stage.
filenameSpecifies the name of the file being protected.
hash_algorithmThe hash algorithm to use for signing.
input_is_textWhether the input data is text.
passphraseThe encryption password.
profileSpecifies a pre-defined profile to apply when creating the signature.
protectionSpecifies a password protection level.
signing_key_countThe number of records in the SigningKey arrays.
signing_key_handleAllows to get or set a 'handle', a unique identifier of the underlying property object.
signing_key_key_fpThe 20-byte fingerprint (hash value) of this key.
signing_key_key_idContains a 8-byte key identifier.
signing_key_passphraseThe key protection password.
signing_key_passphrase_validUse this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.
signing_key_usernameSpecifies the name of the user bound to this key.
timestampThe date and time of the last modification of the protected data file (in UTC).

Method List


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

clear_text_signCreates a cleartext signature over the provided data.
clear_text_sign_fileCreates a cleartext signature over the provided data.
clear_text_sign_stringCreates a cleartext signature over the provided data.
configSets or retrieves a configuration setting.
encryptEncrypts a buffer.
encrypt_and_signEncrypts and signs a buffer.
encrypt_and_sign_fileEncrypts and signs a file.
encrypt_and_sign_folderEncrypts and signs a folder.
encrypt_and_sign_stringEncrypts and signs a string.
encrypt_fileEncrypts a file.
encrypt_folderEncrypts a folder.
encrypt_stringEncrypts a string.
signSigns a buffer.
sign_fileSigns a file.
sign_folderSigns a folder.
sign_stringSigns a string.

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_errorInformation about errors during PGP encryption.
on_external_signHandles remote or external signing initiated by the SignExternal method or other source.
on_key_passphrase_neededRequests a key protection password from the application.
on_notificationThis event notifies the application about an underlying control flow event.
on_progressReports the progress of the decryption operation.

Configuration Settings


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

PasswordAttemptsThe number of attempts allowed for entering password.
PreserveFilePathsWhether to preserve full file names when saving the PGP file.
SignBufferingMethodThe type of buffering used during signing.
TempPathPath for storing temporary files.
TextCompatibilityModeWhether whitespaces must be trimmed from the signature.
UndefInputLengthSet this property if you are working with non-seekable streams.
UseNewFeaturesWhether the new algorithms, or only the algorithms compatible with PGP 2.6.x, are allowed.
UseOldPacketsWhether signature packets of old format, compatible with PGP 2.6.3, should be used.
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 Python Edition - Version 20.0 [Build 8154]