IPWorks Encrypt 2020 iOS Edition

Questions / Feedback?

OpenPGP Class

Properties   Methods   Events   Configuration Settings   Errors  

The OpenPGP class is used to encrypt/decrypt and sign/verify PGP messages.

Syntax

IPWorksEncryptOpenPGP
IPWorksEncryptOpenPGPSwift

Remarks

The OpenPGP class supports encrypting/decrypting and signing/verifying OpenPGP messages in the format specified by RFC 4880.

The Encrypt, Sign, and SignAndEncrypt methods are used to create a message to be sent to your partner. You can additionally create messages bound for multiple recipients with different keys, simultaneously encrypt and compress with the most popular compression algorithms, and control other aspects such as the encrypting algorithm to use.

When a message is received, the Decrypt, VerifySignature, and DecryptAndVerifySignature methods are used to process the incoming message.

The Key* properties specify the key (with private key) used to sign and decrypt.

The SignerKey* properties specify the key used to verify a signature.

The RecipientKey* properties specify the key used to encrypt.

Input and Output Properties

The class will determine the source and destination of the input and output based on which properties are set.

The order in which the input properties are checked is as follows:

When a valid source is found the search stops. The order in which the output properties are checked is as follows:

Property List


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

- ASCIIArmorSpecifies whether to use ASCII armor to encode the output message.
- autoSelectAlgorithmsWhether to automatically select algorithms when encrypting or signing.
- clearSignatureSpecifies whether or not to create a cleartext signature.
- compressionMethodThe compression algorithm used.
- detachedSignatureSpecifies whether or not to generate a detached signature when signing a message.
- encryptingAlgorithmThe encryption algorithm used when encrypting.
- inputFileThe file to process.
- inputMessageThe message to process.
- keyCountThe number of records in the Key arrays.
- keyEncoded:(int)keyIndexThe key.
- keyKeyring:(int)keyIndexThe location of the keyring.
- keyPassphrase:(int)keyIndexThe passphrase for the key's secret key (if any).
- keyUserId:(int)keyIndexThe user Id of the key.
- messageHeaderCountThe number of records in the MessageHeader arrays.
- messageHeaderField:(int)messageHeaderIndexThis property contains the name of the HTTP header (same case as it is delivered).
- messageHeaderValue:(int)messageHeaderIndexThis property contains the header contents.
- outputFileThe output file.
- outputMessageThe output message after processing.
- overwriteIndicates whether or not the class should overwrite files.
- recipientKeyCountThe number of records in the RecipientKey arrays.
- recipientKeyEncoded:(int)recipientKeyIndexThe key.
- recipientKeyKeyring:(int)recipientKeyIndexThe location of the keyring.
- recipientKeyUserId:(int)recipientKeyIndexThe user Id of the key.
- signerKeyCountThe number of records in the SignerKey arrays.
- signerKeyEncoded:(int)signerKeyIndexThe key.
- signerKeyKeyring:(int)signerKeyIndexThe location of the keyring.
- signerKeyUserId:(int)signerKeyIndexThe user Id of the key.
- signingAlgorithmThe signature hash algorithm used when signing.

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.
- decryptDecrypts the message.
- decryptAndVerifySignatureDecrypts and verifies the signature of the message.
- encryptEncrypts the message.
- getRecipientInfoGets recipient information for an encrypted message.
- resetResets the class properties.
- signSigns the message.
- signAndEncryptSigns and encrypts the current message.
- verifySignatureVerifies the signature of the current message.

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 data delivery.
- onKeyPassphraseFired if the passphrase of current key is incorrect or empty.
- onProgressFired as progress is made.
- onRecipientInfoFired for each recipient key of the encrypted message.
- onSignatureInfoFired during verification of the signed message.
- onStatusShows the progress of the operation.
- onVerificationStatusFired after verification of the 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.

AllowEmptyInputWhether to allow empty files for input.
AllowOldPacketTypeWhether to allow the older encrypted packet type.
CompressionLevelThe level of compression used.
DeleteOutputFileOnErrorWhether to delete the output file on an error.
DetachedSignatureDataThe detached signature.
EnsureValidDSASignatureHashAlgorithmWhether or not to select a suitable signature hash algorithm automatically.
FileNameThe original name of the encrypted file.
KeyIdLengthThe length of the KeyId available.
KeySelectionMethodThe method used to select a key for encryption or signing.
LogLevelSpecifies the level of detail that is logged.
PGPZipDirThe directory used when creating or extracting a PGP zip file.
ProgressEventThresholdThe amount of data in bytes to process before firing the progress event.
PublicKeyringFileThe file name of the public keyring file.
ReadFromProgressEventWhether to read input data from inside the progress event.
RecursiveDecryptModeWhether the encrypted data should be decrypted recursively.
RequireEncryptionWhether to throw an error when decrypting and encryption is not detected.
RequireIntegrityProtectedPacketWhether an MDC packet is required for decryption.
RequireSignatureWhether to throw an error when verifying a signature and no signature is found.
RequireValidSignatureSpecifies if an invalid signature is considered an error condition.
SecretKeyringFileThe file name of the secret keyring file.
SplitHeadersControls whether ASCII Armor headers are split or not.
SymmetricPassphraseThe password used for symmetric encryption or decryption.
UseFipsCompliantAlgorithmsRestricts the usage to FIPS compliant algorithms only.
UsePlatformAESWhether to use the platform AES implementation.
VersionHeaderThe Version header value in the ASCII armored OpenPGP message.
WriteToProgressEventWhether to write output data so it is accessible from inside the progress event.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

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