SecureBlackbox 2020 iOS Edition

Questions / Feedback?

PGPKeyring Class

Properties   Methods   Events   Configuration Settings   Errors  

The PGPKeyring class accesses and manages PGP keyring files.

Syntax

SecureBlackboxPGPKeyring
SecureBlackboxPGPKeyringSwift

Remarks

PGPKeyring is used to hold and access PGP keys. It contains information about both public keys and secret keys, which are usually stored in two separate files: "public keyring" and "secret keyring", respectively.

Property List


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

- openedIndicates if the keyring is in an opened state.
- pinnedKeyHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
- publicKeyCountThe number of records in the PublicKey arrays.
- publicKeyBitsInKey:(int)publicKeyIndexIndicates the key length in bits.
- publicKeyCanEncrypt:(int)publicKeyIndexReturns True if this key can be used for encryption.
- publicKeyCanSign:(int)publicKeyIndexReturns True if this key can be used for signing.
- publicKeyCurve:(int)publicKeyIndexIndicates the elliptic curve associated with a EC key.
- publicKeyEnabled:(int)publicKeyIndexEnables or disables this key for use in encryption or signing operation.
- publicKeyEncryptionAlgorithm:(int)publicKeyIndexIndicates the symmetric algorithm used to encrypt the secret key.
- publicKeyExpires:(int)publicKeyIndexIndicates key expiration time in whole days from its generation moment.
- publicKeyHandle:(int)publicKeyIndexAllows to get or set a 'handle', a unique identifier of the underlying property object.
- publicKeyHashAlgorithm:(int)publicKeyIndexSpecifies the hash algorithm associated with the key.
- publicKeyIsPublic:(int)publicKeyIndexReturns True if this key is a public key, and False otherwise.
- publicKeyIsSecret:(int)publicKeyIndexReturns True if this key is a secret key, and False otherwise.
- publicKeyIsSubkey:(int)publicKeyIndexReturns True if this key is a subkey of another key, and False otherwise.
- publicKeyKeyFP:(int)publicKeyIndexThe 20-byte fingerprint (hash value) of this key.
- publicKeyKeyHashAlgorithm:(int)publicKeyIndexSpecifies the hash algorithm used with DSA keys to calculate signatures.
- publicKeyKeyID:(int)publicKeyIndexContains a 8-byte key identifier.
- publicKeyOldPacketFormat:(int)publicKeyIndexIndicates whether legacy (PGP 2.
- publicKeyPassphrase:(int)publicKeyIndexThe key protection password.
- publicKeyPassphraseValid:(int)publicKeyIndexUse this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.
- publicKeyPrimaryKeyID:(int)publicKeyIndexIf this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.
- publicKeyProtection:(int)publicKeyIndexSpecifies the level of protection applied to the secret key.
- publicKeyPublicKeyAlgorithm:(int)publicKeyIndexSpecifies the asymmetric algorithm of the key.
- publicKeyQBits:(int)publicKeyIndexThe length of the DSA Q (legitimate range: 160-512).
- publicKeyRevoked:(int)publicKeyIndexReturns True if the key has been revoked, and False otherwise.
- publicKeySubkeyFP:(int)publicKeyIndexThe 20-byte fingerprint (hash value) of this key's subkey.
- publicKeySubkeyID:(int)publicKeyIndexContains a 8-byte subkey identifier.
- publicKeyTimestamp:(int)publicKeyIndexUse this property to check the time the key was generated.
- publicKeyUsername:(int)publicKeyIndexSpecifies the name of the user bound to this key.
- publicKeyValid:(int)publicKeyIndexIndicates the validity status of the key.
- publicKeyVersion:(int)publicKeyIndexIndicates the key version.
- secretKeyCountThe number of records in the SecretKey arrays.
- secretKeyBitsInKey:(int)secretKeyIndexIndicates the key length in bits.
- secretKeyCanEncrypt:(int)secretKeyIndexReturns True if this key can be used for encryption.
- secretKeyCanSign:(int)secretKeyIndexReturns True if this key can be used for signing.
- secretKeyCurve:(int)secretKeyIndexIndicates the elliptic curve associated with a EC key.
- secretKeyEnabled:(int)secretKeyIndexEnables or disables this key for use in encryption or signing operation.
- secretKeyEncryptionAlgorithm:(int)secretKeyIndexIndicates the symmetric algorithm used to encrypt the secret key.
- secretKeyExpires:(int)secretKeyIndexIndicates key expiration time in whole days from its generation moment.
- secretKeyHandle:(int)secretKeyIndexAllows to get or set a 'handle', a unique identifier of the underlying property object.
- secretKeyHashAlgorithm:(int)secretKeyIndexSpecifies the hash algorithm associated with the key.
- secretKeyIsPublic:(int)secretKeyIndexReturns True if this key is a public key, and False otherwise.
- secretKeyIsSecret:(int)secretKeyIndexReturns True if this key is a secret key, and False otherwise.
- secretKeyIsSubkey:(int)secretKeyIndexReturns True if this key is a subkey of another key, and False otherwise.
- secretKeyKeyFP:(int)secretKeyIndexThe 20-byte fingerprint (hash value) of this key.
- secretKeyKeyHashAlgorithm:(int)secretKeyIndexSpecifies the hash algorithm used with DSA keys to calculate signatures.
- secretKeyKeyID:(int)secretKeyIndexContains a 8-byte key identifier.
- secretKeyOldPacketFormat:(int)secretKeyIndexIndicates whether legacy (PGP 2.
- secretKeyPassphrase:(int)secretKeyIndexThe key protection password.
- secretKeyPassphraseValid:(int)secretKeyIndexUse this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.
- secretKeyPrimaryKeyID:(int)secretKeyIndexIf this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.
- secretKeyProtection:(int)secretKeyIndexSpecifies the level of protection applied to the secret key.
- secretKeyPublicKeyAlgorithm:(int)secretKeyIndexSpecifies the asymmetric algorithm of the key.
- secretKeyQBits:(int)secretKeyIndexThe length of the DSA Q (legitimate range: 160-512).
- secretKeyRevoked:(int)secretKeyIndexReturns True if the key has been revoked, and False otherwise.
- secretKeySubkeyFP:(int)secretKeyIndexThe 20-byte fingerprint (hash value) of this key's subkey.
- secretKeySubkeyID:(int)secretKeyIndexContains a 8-byte subkey identifier.
- secretKeyTimestamp:(int)secretKeyIndexUse this property to check the time the key was generated.
- secretKeyUsername:(int)secretKeyIndexSpecifies the name of the user bound to this key.
- secretKeyValid:(int)secretKeyIndexIndicates the validity status of the key.
- secretKeyVersion:(int)secretKeyIndexIndicates the key version.
- selectedPublicKeyCountThe number of records in the SelectedPublicKey arrays.
- selectedPublicKeyBitsInKey:(int)selectedPublicKeyIndexIndicates the key length in bits.
- selectedPublicKeyCanEncrypt:(int)selectedPublicKeyIndexReturns True if this key can be used for encryption.
- selectedPublicKeyCanSign:(int)selectedPublicKeyIndexReturns True if this key can be used for signing.
- selectedPublicKeyCurve:(int)selectedPublicKeyIndexIndicates the elliptic curve associated with a EC key.
- selectedPublicKeyEnabled:(int)selectedPublicKeyIndexEnables or disables this key for use in encryption or signing operation.
- selectedPublicKeyEncryptionAlgorithm:(int)selectedPublicKeyIndexIndicates the symmetric algorithm used to encrypt the secret key.
- selectedPublicKeyExpires:(int)selectedPublicKeyIndexIndicates key expiration time in whole days from its generation moment.
- selectedPublicKeyHandle:(int)selectedPublicKeyIndexAllows to get or set a 'handle', a unique identifier of the underlying property object.
- selectedPublicKeyHashAlgorithm:(int)selectedPublicKeyIndexSpecifies the hash algorithm associated with the key.
- selectedPublicKeyIsPublic:(int)selectedPublicKeyIndexReturns True if this key is a public key, and False otherwise.
- selectedPublicKeyIsSecret:(int)selectedPublicKeyIndexReturns True if this key is a secret key, and False otherwise.
- selectedPublicKeyIsSubkey:(int)selectedPublicKeyIndexReturns True if this key is a subkey of another key, and False otherwise.
- selectedPublicKeyKeyFP:(int)selectedPublicKeyIndexThe 20-byte fingerprint (hash value) of this key.
- selectedPublicKeyKeyHashAlgorithm:(int)selectedPublicKeyIndexSpecifies the hash algorithm used with DSA keys to calculate signatures.
- selectedPublicKeyKeyID:(int)selectedPublicKeyIndexContains a 8-byte key identifier.
- selectedPublicKeyOldPacketFormat:(int)selectedPublicKeyIndexIndicates whether legacy (PGP 2.
- selectedPublicKeyPassphrase:(int)selectedPublicKeyIndexThe key protection password.
- selectedPublicKeyPassphraseValid:(int)selectedPublicKeyIndexUse this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.
- selectedPublicKeyPrimaryKeyID:(int)selectedPublicKeyIndexIf this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.
- selectedPublicKeyProtection:(int)selectedPublicKeyIndexSpecifies the level of protection applied to the secret key.
- selectedPublicKeyPublicKeyAlgorithm:(int)selectedPublicKeyIndexSpecifies the asymmetric algorithm of the key.
- selectedPublicKeyQBits:(int)selectedPublicKeyIndexThe length of the DSA Q (legitimate range: 160-512).
- selectedPublicKeyRevoked:(int)selectedPublicKeyIndexReturns True if the key has been revoked, and False otherwise.
- selectedPublicKeySubkeyFP:(int)selectedPublicKeyIndexThe 20-byte fingerprint (hash value) of this key's subkey.
- selectedPublicKeySubkeyID:(int)selectedPublicKeyIndexContains a 8-byte subkey identifier.
- selectedPublicKeyTimestamp:(int)selectedPublicKeyIndexUse this property to check the time the key was generated.
- selectedPublicKeyUsername:(int)selectedPublicKeyIndexSpecifies the name of the user bound to this key.
- selectedPublicKeyValid:(int)selectedPublicKeyIndexIndicates the validity status of the key.
- selectedPublicKeyVersion:(int)selectedPublicKeyIndexIndicates the key version.
- selectedSecretKeyCountThe number of records in the SelectedSecretKey arrays.
- selectedSecretKeyBitsInKey:(int)selectedSecretKeyIndexIndicates the key length in bits.
- selectedSecretKeyCanEncrypt:(int)selectedSecretKeyIndexReturns True if this key can be used for encryption.
- selectedSecretKeyCanSign:(int)selectedSecretKeyIndexReturns True if this key can be used for signing.
- selectedSecretKeyCurve:(int)selectedSecretKeyIndexIndicates the elliptic curve associated with a EC key.
- selectedSecretKeyEnabled:(int)selectedSecretKeyIndexEnables or disables this key for use in encryption or signing operation.
- selectedSecretKeyEncryptionAlgorithm:(int)selectedSecretKeyIndexIndicates the symmetric algorithm used to encrypt the secret key.
- selectedSecretKeyExpires:(int)selectedSecretKeyIndexIndicates key expiration time in whole days from its generation moment.
- selectedSecretKeyHandle:(int)selectedSecretKeyIndexAllows to get or set a 'handle', a unique identifier of the underlying property object.
- selectedSecretKeyHashAlgorithm:(int)selectedSecretKeyIndexSpecifies the hash algorithm associated with the key.
- selectedSecretKeyIsPublic:(int)selectedSecretKeyIndexReturns True if this key is a public key, and False otherwise.
- selectedSecretKeyIsSecret:(int)selectedSecretKeyIndexReturns True if this key is a secret key, and False otherwise.
- selectedSecretKeyIsSubkey:(int)selectedSecretKeyIndexReturns True if this key is a subkey of another key, and False otherwise.
- selectedSecretKeyKeyFP:(int)selectedSecretKeyIndexThe 20-byte fingerprint (hash value) of this key.
- selectedSecretKeyKeyHashAlgorithm:(int)selectedSecretKeyIndexSpecifies the hash algorithm used with DSA keys to calculate signatures.
- selectedSecretKeyKeyID:(int)selectedSecretKeyIndexContains a 8-byte key identifier.
- selectedSecretKeyOldPacketFormat:(int)selectedSecretKeyIndexIndicates whether legacy (PGP 2.
- selectedSecretKeyPassphrase:(int)selectedSecretKeyIndexThe key protection password.
- selectedSecretKeyPassphraseValid:(int)selectedSecretKeyIndexUse this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.
- selectedSecretKeyPrimaryKeyID:(int)selectedSecretKeyIndexIf this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.
- selectedSecretKeyProtection:(int)selectedSecretKeyIndexSpecifies the level of protection applied to the secret key.
- selectedSecretKeyPublicKeyAlgorithm:(int)selectedSecretKeyIndexSpecifies the asymmetric algorithm of the key.
- selectedSecretKeyQBits:(int)selectedSecretKeyIndexThe length of the DSA Q (legitimate range: 160-512).
- selectedSecretKeyRevoked:(int)selectedSecretKeyIndexReturns True if the key has been revoked, and False otherwise.
- selectedSecretKeySubkeyFP:(int)selectedSecretKeyIndexThe 20-byte fingerprint (hash value) of this key's subkey.
- selectedSecretKeySubkeyID:(int)selectedSecretKeyIndexContains a 8-byte subkey identifier.
- selectedSecretKeyTimestamp:(int)selectedSecretKeyIndexUse this property to check the time the key was generated.
- selectedSecretKeyUsername:(int)selectedSecretKeyIndexSpecifies the name of the user bound to this key.
- selectedSecretKeyValid:(int)selectedSecretKeyIndexIndicates the validity status of the key.
- selectedSecretKeyVersion:(int)selectedSecretKeyIndexIndicates the key version.

Method List


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

- addFromFileAdds an existing key to the keyring.
- addFromFilesAdds a collection of keys to the keyring.
- addPinnedAdds a pinned secret key to the keyring.
- clearRemoves all the keys from the keyring.
- closeCloses the keyring.
- configSets or retrieves a configuration setting.
- createNewCreates a new empty keyring.
- loadLoads a keyring from disk.
- loadFromBytesLoads a keyring from two byte arrays.
- removeByIDRemoves key by its ID.
- removePublicRemoves the specified public key from the keyring.
- removeSecretRemoves the specified secret key from the keyring.
- saveSaves the keyring to disk.
- saveToBytesSaves the keyring to a byte array.
- selectFilters a selection of keys from the keyring using a template.

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 PGP key management.
- 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.

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]