PGPKeyring Class

Properties   Methods   Events   Config Settings   Errors  

The PGPKeyring class accesses and manages PGP keyring files.

Syntax

PGPKeyring

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.

FIPSModeReserved.
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.
PublicKeyBitsInKeyIndicates the key length in bits.
PublicKeyCanEncryptReturns True if this key can be used for encryption.
PublicKeyCanSignReturns True if this key can be used for signing.
PublicKeyCurveIndicates the elliptic curve associated with a EC key.
PublicKeyEnabledEnables or disables this key for use in encryption or signing operation.
PublicKeyEncryptionAlgorithmIndicates the symmetric algorithm used to encrypt the secret key.
PublicKeyExpiresIndicates key expiration time in whole days from its generation moment.
PublicKeyHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
PublicKeyHashAlgorithmSpecifies the hash algorithm associated with the key.
PublicKeyIsPublicReturns True if this key is a public key, and False otherwise.
PublicKeyIsSecretReturns True if this key is a secret key, and False otherwise.
PublicKeyIsSubkeyReturns True if this key is a subkey of another key, and False otherwise.
PublicKeyKeyFPThe 20-byte fingerprint (hash value) of this key.
PublicKeyKeyHashAlgorithmSpecifies the hash algorithm used with DSA keys to calculate signatures.
PublicKeyKeyIDContains a 8-byte key identifier.
PublicKeyOldPacketFormatIndicates whether legacy (PGP 2.
PublicKeyPassphraseThe key protection password.
PublicKeyPassphraseValidUse this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.
PublicKeyPrimaryKeyIDIf this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.
PublicKeyProtectionSpecifies the level of protection applied to the secret key.
PublicKeyPublicKeyAlgorithmSpecifies the asymmetric algorithm of the key.
PublicKeyQBitsThe length of the DSA Q (legitimate range: 160-512).
PublicKeyRevokedReturns True if the key has been revoked, and False otherwise.
PublicKeySubkeyFPThe 20-byte fingerprint (hash value) of this key's subkey.
PublicKeySubkeyIDContains a 8-byte subkey identifier.
PublicKeyTimestampUse this property to check the time the key was generated.
PublicKeyUsernameSpecifies the name of the user bound to this key.
PublicKeyValidIndicates the validity status of the key.
PublicKeyValidToProvide accurate expiration moment indication.
PublicKeyVersionIndicates the key version.
SecretKeyCountThe number of records in the SecretKey arrays.
SecretKeyBitsInKeyIndicates the key length in bits.
SecretKeyCanEncryptReturns True if this key can be used for encryption.
SecretKeyCanSignReturns True if this key can be used for signing.
SecretKeyCurveIndicates the elliptic curve associated with a EC key.
SecretKeyEnabledEnables or disables this key for use in encryption or signing operation.
SecretKeyEncryptionAlgorithmIndicates the symmetric algorithm used to encrypt the secret key.
SecretKeyExpiresIndicates key expiration time in whole days from its generation moment.
SecretKeyHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
SecretKeyHashAlgorithmSpecifies the hash algorithm associated with the key.
SecretKeyIsPublicReturns True if this key is a public key, and False otherwise.
SecretKeyIsSecretReturns True if this key is a secret key, and False otherwise.
SecretKeyIsSubkeyReturns True if this key is a subkey of another key, and False otherwise.
SecretKeyKeyFPThe 20-byte fingerprint (hash value) of this key.
SecretKeyKeyHashAlgorithmSpecifies the hash algorithm used with DSA keys to calculate signatures.
SecretKeyKeyIDContains a 8-byte key identifier.
SecretKeyOldPacketFormatIndicates whether legacy (PGP 2.
SecretKeyPassphraseThe key protection password.
SecretKeyPassphraseValidUse this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.
SecretKeyPrimaryKeyIDIf this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.
SecretKeyProtectionSpecifies the level of protection applied to the secret key.
SecretKeyPublicKeyAlgorithmSpecifies the asymmetric algorithm of the key.
SecretKeyQBitsThe length of the DSA Q (legitimate range: 160-512).
SecretKeyRevokedReturns True if the key has been revoked, and False otherwise.
SecretKeySubkeyFPThe 20-byte fingerprint (hash value) of this key's subkey.
SecretKeySubkeyIDContains a 8-byte subkey identifier.
SecretKeyTimestampUse this property to check the time the key was generated.
SecretKeyUsernameSpecifies the name of the user bound to this key.
SecretKeyValidIndicates the validity status of the key.
SecretKeyValidToProvide accurate expiration moment indication.
SecretKeyVersionIndicates the key version.
SelectedPublicKeyCountThe number of records in the SelectedPublicKey arrays.
SelectedPublicKeyBitsInKeyIndicates the key length in bits.
SelectedPublicKeyCanEncryptReturns True if this key can be used for encryption.
SelectedPublicKeyCanSignReturns True if this key can be used for signing.
SelectedPublicKeyCurveIndicates the elliptic curve associated with a EC key.
SelectedPublicKeyEnabledEnables or disables this key for use in encryption or signing operation.
SelectedPublicKeyEncryptionAlgorithmIndicates the symmetric algorithm used to encrypt the secret key.
SelectedPublicKeyExpiresIndicates key expiration time in whole days from its generation moment.
SelectedPublicKeyHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
SelectedPublicKeyHashAlgorithmSpecifies the hash algorithm associated with the key.
SelectedPublicKeyIsPublicReturns True if this key is a public key, and False otherwise.
SelectedPublicKeyIsSecretReturns True if this key is a secret key, and False otherwise.
SelectedPublicKeyIsSubkeyReturns True if this key is a subkey of another key, and False otherwise.
SelectedPublicKeyKeyFPThe 20-byte fingerprint (hash value) of this key.
SelectedPublicKeyKeyHashAlgorithmSpecifies the hash algorithm used with DSA keys to calculate signatures.
SelectedPublicKeyKeyIDContains a 8-byte key identifier.
SelectedPublicKeyOldPacketFormatIndicates whether legacy (PGP 2.
SelectedPublicKeyPassphraseThe key protection password.
SelectedPublicKeyPassphraseValidUse this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.
SelectedPublicKeyPrimaryKeyIDIf this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.
SelectedPublicKeyProtectionSpecifies the level of protection applied to the secret key.
SelectedPublicKeyPublicKeyAlgorithmSpecifies the asymmetric algorithm of the key.
SelectedPublicKeyQBitsThe length of the DSA Q (legitimate range: 160-512).
SelectedPublicKeyRevokedReturns True if the key has been revoked, and False otherwise.
SelectedPublicKeySubkeyFPThe 20-byte fingerprint (hash value) of this key's subkey.
SelectedPublicKeySubkeyIDContains a 8-byte subkey identifier.
SelectedPublicKeyTimestampUse this property to check the time the key was generated.
SelectedPublicKeyUsernameSpecifies the name of the user bound to this key.
SelectedPublicKeyValidIndicates the validity status of the key.
SelectedPublicKeyValidToProvide accurate expiration moment indication.
SelectedPublicKeyVersionIndicates the key version.
SelectedSecretKeyCountThe number of records in the SelectedSecretKey arrays.
SelectedSecretKeyBitsInKeyIndicates the key length in bits.
SelectedSecretKeyCanEncryptReturns True if this key can be used for encryption.
SelectedSecretKeyCanSignReturns True if this key can be used for signing.
SelectedSecretKeyCurveIndicates the elliptic curve associated with a EC key.
SelectedSecretKeyEnabledEnables or disables this key for use in encryption or signing operation.
SelectedSecretKeyEncryptionAlgorithmIndicates the symmetric algorithm used to encrypt the secret key.
SelectedSecretKeyExpiresIndicates key expiration time in whole days from its generation moment.
SelectedSecretKeyHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
SelectedSecretKeyHashAlgorithmSpecifies the hash algorithm associated with the key.
SelectedSecretKeyIsPublicReturns True if this key is a public key, and False otherwise.
SelectedSecretKeyIsSecretReturns True if this key is a secret key, and False otherwise.
SelectedSecretKeyIsSubkeyReturns True if this key is a subkey of another key, and False otherwise.
SelectedSecretKeyKeyFPThe 20-byte fingerprint (hash value) of this key.
SelectedSecretKeyKeyHashAlgorithmSpecifies the hash algorithm used with DSA keys to calculate signatures.
SelectedSecretKeyKeyIDContains a 8-byte key identifier.
SelectedSecretKeyOldPacketFormatIndicates whether legacy (PGP 2.
SelectedSecretKeyPassphraseThe key protection password.
SelectedSecretKeyPassphraseValidUse this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.
SelectedSecretKeyPrimaryKeyIDIf this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.
SelectedSecretKeyProtectionSpecifies the level of protection applied to the secret key.
SelectedSecretKeyPublicKeyAlgorithmSpecifies the asymmetric algorithm of the key.
SelectedSecretKeyQBitsThe length of the DSA Q (legitimate range: 160-512).
SelectedSecretKeyRevokedReturns True if the key has been revoked, and False otherwise.
SelectedSecretKeySubkeyFPThe 20-byte fingerprint (hash value) of this key's subkey.
SelectedSecretKeySubkeyIDContains a 8-byte subkey identifier.
SelectedSecretKeyTimestampUse this property to check the time the key was generated.
SelectedSecretKeyUsernameSpecifies the name of the user bound to this key.
SelectedSecretKeyValidIndicates the validity status of the key.
SelectedSecretKeyValidToProvide accurate expiration moment indication.
SelectedSecretKeyVersionIndicates 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.

AddFromBytesAdds an existing key to the keyring.
AddFromFileAdds an existing key to the keyring.
AddFromFilesAdds a collection of keys to the keyring.
AddFromStreamAdds a key to the keyring.
AddFromStreamsAdds 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.
DoActionPerforms an additional action.
LoadLoads a keyring from disk.
LoadFromBytesLoads a keyring from two byte arrays.
LoadFromStreamsLoads a keyring from two streams.
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.
SaveToStreamsSaves the keyring to streams.
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.

ErrorInformation about errors during PGP key management.
NotificationThis event notifies the application about an underlying control flow event.

Config Settings


The following is a list of config 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.
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.
StaticDNSSpecifies whether static DNS rules should be used.
StaticIPAddress[domain]Gets or sets an IP address for the specified domain name.
StaticIPAddressesGets or sets all the static DNS rules.
TagAllows to store any custom data.
TLSSessionGroupSpecifies the group name of TLS sessions to be used for session resumption.
TLSSessionLifetimeSpecifies lifetime in seconds of the cached TLS session.
TLSSessionPurgeIntervalSpecifies how often the session cache should remove the expired TLS sessions.
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.

FIPSMode Property (PGPKeyring Class)

Reserved.

Syntax

ANSI (Cross Platform)
int GetFIPSMode();
int SetFIPSMode(int bFIPSMode); Unicode (Windows) BOOL GetFIPSMode();
INT SetFIPSMode(BOOL bFIPSMode);
int secureblackbox_pgpkeyring_getfipsmode(void* lpObj);
int secureblackbox_pgpkeyring_setfipsmode(void* lpObj, int bFIPSMode);
bool GetFIPSMode();
int SetFIPSMode(bool bFIPSMode);

Default Value

FALSE

Remarks

This property is reserved for future use.

Data Type

Boolean

Opened Property (PGPKeyring Class)

Indicates if the keyring is in an opened state.

Syntax

ANSI (Cross Platform)
int GetOpened();

Unicode (Windows)
BOOL GetOpened();
int secureblackbox_pgpkeyring_getopened(void* lpObj);
bool GetOpened();

Default Value

FALSE

Remarks

If the keyring is open, it means that you can access, add, or removes keys from it.

This property is read-only and not available at design time.

Data Type

Boolean

PinnedKeyHandle Property (PGPKeyring Class)

Allows to get or set a 'handle', a unique identifier of the underlying property object.

Syntax

ANSI (Cross Platform)
int64 GetPinnedKeyHandle();
int SetPinnedKeyHandle(int64 lPinnedKeyHandle); Unicode (Windows) LONG64 GetPinnedKeyHandle();
INT SetPinnedKeyHandle(LONG64 lPinnedKeyHandle);
int64 secureblackbox_pgpkeyring_getpinnedkeyhandle(void* lpObj);
int secureblackbox_pgpkeyring_setpinnedkeyhandle(void* lpObj, int64 lPinnedKeyHandle);
qint64 GetPinnedKeyHandle();
int SetPinnedKeyHandle(qint64 lPinnedKeyHandle);

Default Value

0

Remarks

Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.

When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object after such operation. pdfSigner.setSigningCertHandle(certMgr.getCertHandle());

This property is not available at design time.

Data Type

Long64

PublicKeyCount Property (PGPKeyring Class)

The number of records in the PublicKey arrays.

Syntax

ANSI (Cross Platform)
int GetPublicKeyCount();

Unicode (Windows)
INT GetPublicKeyCount();
int secureblackbox_pgpkeyring_getpublickeycount(void* lpObj);
int GetPublicKeyCount();

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at PublicKeyCount - 1.

This property is read-only and not available at design time.

Data Type

Integer

PublicKeyBitsInKey Property (PGPKeyring Class)

Indicates the key length in bits.

Syntax

ANSI (Cross Platform)
int GetPublicKeyBitsInKey(int iPublicKeyIndex);

Unicode (Windows)
INT GetPublicKeyBitsInKey(INT iPublicKeyIndex);
int secureblackbox_pgpkeyring_getpublickeybitsinkey(void* lpObj, int publickeyindex);
int GetPublicKeyBitsInKey(int iPublicKeyIndex);

Default Value

2048

Remarks

Indicates the key length in bits.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

PublicKeyCanEncrypt Property (PGPKeyring Class)

Returns True if this key can be used for encryption.

Syntax

ANSI (Cross Platform)
int GetPublicKeyCanEncrypt(int iPublicKeyIndex);

Unicode (Windows)
BOOL GetPublicKeyCanEncrypt(INT iPublicKeyIndex);
int secureblackbox_pgpkeyring_getpublickeycanencrypt(void* lpObj, int publickeyindex);
bool GetPublicKeyCanEncrypt(int iPublicKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key can be used for encryption.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

PublicKeyCanSign Property (PGPKeyring Class)

Returns True if this key can be used for signing.

Syntax

ANSI (Cross Platform)
int GetPublicKeyCanSign(int iPublicKeyIndex);

Unicode (Windows)
BOOL GetPublicKeyCanSign(INT iPublicKeyIndex);
int secureblackbox_pgpkeyring_getpublickeycansign(void* lpObj, int publickeyindex);
bool GetPublicKeyCanSign(int iPublicKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key can be used for signing.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

PublicKeyCurve Property (PGPKeyring Class)

Indicates the elliptic curve associated with a EC key.

Syntax

ANSI (Cross Platform)
char* GetPublicKeyCurve(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeyCurve(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeycurve(void* lpObj, int publickeyindex);
QString GetPublicKeyCurve(int iPublicKeyIndex);

Default Value

""

Remarks

Indicates the elliptic curve associated with a EC key.

Supported values:

SB_PGP_CURVE_P256P256
SB_PGP_CURVE_P384P384
SB_PGP_CURVE_P521P521
SB_PGP_CURVE_ED25519ED25519
SB_PGP_CURVE_CURVE25519CURVE25519
SB_PGP_CURVE_BRAINPOOLP256R1BRAINPOOLP256
SB_PGP_CURVE_BRAINPOOLP512R1BRAINPOOLP512

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeyEnabled Property (PGPKeyring Class)

Enables or disables this key for use in encryption or signing operation.

Syntax

ANSI (Cross Platform)
int GetPublicKeyEnabled(int iPublicKeyIndex);

Unicode (Windows)
BOOL GetPublicKeyEnabled(INT iPublicKeyIndex);
int secureblackbox_pgpkeyring_getpublickeyenabled(void* lpObj, int publickeyindex);
bool GetPublicKeyEnabled(int iPublicKeyIndex);

Default Value

FALSE

Remarks

Enables or disables this key for use in encryption or signing operation.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

PublicKeyEncryptionAlgorithm Property (PGPKeyring Class)

Indicates the symmetric algorithm used to encrypt the secret key.

Syntax

ANSI (Cross Platform)
char* GetPublicKeyEncryptionAlgorithm(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeyEncryptionAlgorithm(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeyencryptionalgorithm(void* lpObj, int publickeyindex);
QString GetPublicKeyEncryptionAlgorithm(int iPublicKeyIndex);

Default Value

"CAST5"

Remarks

Indicates the symmetric algorithm used to encrypt the secret key.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeyExpires Property (PGPKeyring Class)

Indicates key expiration time in whole days from its generation moment.

Syntax

ANSI (Cross Platform)
int GetPublicKeyExpires(int iPublicKeyIndex);

Unicode (Windows)
INT GetPublicKeyExpires(INT iPublicKeyIndex);
int secureblackbox_pgpkeyring_getpublickeyexpires(void* lpObj, int publickeyindex);
int GetPublicKeyExpires(int iPublicKeyIndex);

Default Value

0

Remarks

Indicates key expiration time in whole days from its generation moment. The value of 0 indicates that the key does not expire.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

PublicKeyHandle Property (PGPKeyring Class)

Allows to get or set a 'handle', a unique identifier of the underlying property object.

Syntax

ANSI (Cross Platform)
int64 GetPublicKeyHandle(int iPublicKeyIndex);

Unicode (Windows)
LONG64 GetPublicKeyHandle(INT iPublicKeyIndex);
int64 secureblackbox_pgpkeyring_getpublickeyhandle(void* lpObj, int publickeyindex);
qint64 GetPublicKeyHandle(int iPublicKeyIndex);

Default Value

0

Remarks

Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.

When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object after such operation. pdfSigner.setSigningCertHandle(certMgr.getCertHandle());

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Long64

PublicKeyHashAlgorithm Property (PGPKeyring Class)

Specifies the hash algorithm associated with the key.

Syntax

ANSI (Cross Platform)
char* GetPublicKeyHashAlgorithm(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeyHashAlgorithm(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeyhashalgorithm(void* lpObj, int publickeyindex);
QString GetPublicKeyHashAlgorithm(int iPublicKeyIndex);

Default Value

"SHA256"

Remarks

Specifies the hash algorithm associated with the key.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeyIsPublic Property (PGPKeyring Class)

Returns True if this key is a public key, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetPublicKeyIsPublic(int iPublicKeyIndex);

Unicode (Windows)
BOOL GetPublicKeyIsPublic(INT iPublicKeyIndex);
int secureblackbox_pgpkeyring_getpublickeyispublic(void* lpObj, int publickeyindex);
bool GetPublicKeyIsPublic(int iPublicKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key is a public key, and False otherwise.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

PublicKeyIsSecret Property (PGPKeyring Class)

Returns True if this key is a secret key, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetPublicKeyIsSecret(int iPublicKeyIndex);

Unicode (Windows)
BOOL GetPublicKeyIsSecret(INT iPublicKeyIndex);
int secureblackbox_pgpkeyring_getpublickeyissecret(void* lpObj, int publickeyindex);
bool GetPublicKeyIsSecret(int iPublicKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key is a secret key, and False otherwise.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

PublicKeyIsSubkey Property (PGPKeyring Class)

Returns True if this key is a subkey of another key, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetPublicKeyIsSubkey(int iPublicKeyIndex);

Unicode (Windows)
BOOL GetPublicKeyIsSubkey(INT iPublicKeyIndex);
int secureblackbox_pgpkeyring_getpublickeyissubkey(void* lpObj, int publickeyindex);
bool GetPublicKeyIsSubkey(int iPublicKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key is a subkey of another key, and False otherwise.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

PublicKeyKeyFP Property (PGPKeyring Class)

The 20-byte fingerprint (hash value) of this key.

Syntax

ANSI (Cross Platform)
char* GetPublicKeyKeyFP(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeyKeyFP(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeykeyfp(void* lpObj, int publickeyindex);
QString GetPublicKeyKeyFP(int iPublicKeyIndex);

Default Value

""

Remarks

The 20-byte fingerprint (hash value) of this key.

KeyFP could be used to distinguish two keys with the same KeyID.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeyKeyHashAlgorithm Property (PGPKeyring Class)

Specifies the hash algorithm used with DSA keys to calculate signatures.

Syntax

ANSI (Cross Platform)
char* GetPublicKeyKeyHashAlgorithm(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeyKeyHashAlgorithm(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeykeyhashalgorithm(void* lpObj, int publickeyindex);
QString GetPublicKeyKeyHashAlgorithm(int iPublicKeyIndex);

Default Value

"SHA256"

Remarks

Specifies the hash algorithm used with DSA keys to calculate signatures.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeyKeyID Property (PGPKeyring Class)

Contains a 8-byte key identifier.

Syntax

ANSI (Cross Platform)
char* GetPublicKeyKeyID(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeyKeyID(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeykeyid(void* lpObj, int publickeyindex);
QString GetPublicKeyKeyID(int iPublicKeyIndex);

Default Value

""

Remarks

Contains a 8-byte key identifier.

It is quite rare that IDs of two keys collide. If that happens, their fingerprints (KeyFP) can be used for distinguish between the keys. Please note that many PGP implementations show only 4 lowest bytes of the KeyID to the user.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeyOldPacketFormat Property (PGPKeyring Class)

Indicates whether legacy (PGP 2.

Syntax

ANSI (Cross Platform)
int GetPublicKeyOldPacketFormat(int iPublicKeyIndex);

Unicode (Windows)
BOOL GetPublicKeyOldPacketFormat(INT iPublicKeyIndex);
int secureblackbox_pgpkeyring_getpublickeyoldpacketformat(void* lpObj, int publickeyindex);
bool GetPublicKeyOldPacketFormat(int iPublicKeyIndex);

Default Value

FALSE

Remarks

Indicates whether legacy (PGP 2.6.x) packet format should be used.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

PublicKeyPassphrase Property (PGPKeyring Class)

The key protection password.

Syntax

ANSI (Cross Platform)
char* GetPublicKeyPassphrase(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeyPassphrase(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeypassphrase(void* lpObj, int publickeyindex);
QString GetPublicKeyPassphrase(int iPublicKeyIndex);

Default Value

""

Remarks

The key protection password.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeyPassphraseValid Property (PGPKeyring Class)

Use this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.

Syntax

ANSI (Cross Platform)
int GetPublicKeyPassphraseValid(int iPublicKeyIndex);

Unicode (Windows)
BOOL GetPublicKeyPassphraseValid(INT iPublicKeyIndex);
int secureblackbox_pgpkeyring_getpublickeypassphrasevalid(void* lpObj, int publickeyindex);
bool GetPublicKeyPassphraseValid(int iPublicKeyIndex);

Default Value

FALSE

Remarks

Use this property to check whether the specified PublicKeyPassphrase is valid and can be used to unlock the secret key.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

PublicKeyPrimaryKeyID Property (PGPKeyring Class)

If this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.

Syntax

ANSI (Cross Platform)
char* GetPublicKeyPrimaryKeyID(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeyPrimaryKeyID(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeyprimarykeyid(void* lpObj, int publickeyindex);
QString GetPublicKeyPrimaryKeyID(int iPublicKeyIndex);

Default Value

""

Remarks

If this key is a subkey (PublicKeyIsSubkey returns True), this property contains the identifier of the subkey's primary key.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeyProtection Property (PGPKeyring Class)

Specifies the level of protection applied to the secret key.

Syntax

ANSI (Cross Platform)
int GetPublicKeyProtection(int iPublicKeyIndex);

Unicode (Windows)
INT GetPublicKeyProtection(INT iPublicKeyIndex);

Possible Values

PPT_NONE(0), 
PPT_LOW(1),
PPT_NORMAL(2),
PPT_HIGH(3)
int secureblackbox_pgpkeyring_getpublickeyprotection(void* lpObj, int publickeyindex);
int GetPublicKeyProtection(int iPublicKeyIndex);

Default Value

0

Remarks

Specifies the level of protection applied to the secret key.

Allowed values:

pptNone0Key is not encrypted
pptLow1Only the password hash is used to derive the secret key
pptNormal2Password hash with salt is used to derive the secret key
pptHigh3Hash from multiple passwords and salt are used for key derivation

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

PublicKeyPublicKeyAlgorithm Property (PGPKeyring Class)

Specifies the asymmetric algorithm of the key.

Syntax

ANSI (Cross Platform)
char* GetPublicKeyPublicKeyAlgorithm(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeyPublicKeyAlgorithm(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeypublickeyalgorithm(void* lpObj, int publickeyindex);
QString GetPublicKeyPublicKeyAlgorithm(int iPublicKeyIndex);

Default Value

""

Remarks

Specifies the asymmetric algorithm of the key.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeyQBits Property (PGPKeyring Class)

The length of the DSA Q (legitimate range: 160-512).

Syntax

ANSI (Cross Platform)
int GetPublicKeyQBits(int iPublicKeyIndex);

Unicode (Windows)
INT GetPublicKeyQBits(INT iPublicKeyIndex);
int secureblackbox_pgpkeyring_getpublickeyqbits(void* lpObj, int publickeyindex);
int GetPublicKeyQBits(int iPublicKeyIndex);

Default Value

0

Remarks

The length of the DSA Q (legitimate range: 160-512).

This parameter corresponds to the hash algorithm used with the key. For example, if the value of Q is 256, SHA-256 will be used.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

PublicKeyRevoked Property (PGPKeyring Class)

Returns True if the key has been revoked, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetPublicKeyRevoked(int iPublicKeyIndex);

Unicode (Windows)
BOOL GetPublicKeyRevoked(INT iPublicKeyIndex);
int secureblackbox_pgpkeyring_getpublickeyrevoked(void* lpObj, int publickeyindex);
bool GetPublicKeyRevoked(int iPublicKeyIndex);

Default Value

FALSE

Remarks

Returns True if the key has been revoked, and False otherwise.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

PublicKeySubkeyFP Property (PGPKeyring Class)

The 20-byte fingerprint (hash value) of this key's subkey.

Syntax

ANSI (Cross Platform)
char* GetPublicKeySubkeyFP(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeySubkeyFP(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeysubkeyfp(void* lpObj, int publickeyindex);
QString GetPublicKeySubkeyFP(int iPublicKeyIndex);

Default Value

""

Remarks

The 20-byte fingerprint (hash value) of this key's subkey.

KeyFP could be used to distinguish two subkeys with the same SubkeyID.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeySubkeyID Property (PGPKeyring Class)

Contains a 8-byte subkey identifier.

Syntax

ANSI (Cross Platform)
char* GetPublicKeySubkeyID(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeySubkeyID(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeysubkeyid(void* lpObj, int publickeyindex);
QString GetPublicKeySubkeyID(int iPublicKeyIndex);

Default Value

""

Remarks

Contains a 8-byte subkey identifier.

It is quite rare that IDs of two keys collide. If that happens, their fingerprints (SubkeyFP) can be used to distinguish between the keys. Please note that many PGP implementations show only 4 lowest bytes of the KeyID to the user.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeyTimestamp Property (PGPKeyring Class)

Use this property to check the time the key was generated.

Syntax

ANSI (Cross Platform)
char* GetPublicKeyTimestamp(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeyTimestamp(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeytimestamp(void* lpObj, int publickeyindex);
QString GetPublicKeyTimestamp(int iPublicKeyIndex);

Default Value

""

Remarks

Use this property to check the time the key was generated. The date and time are stored and retrieved in Universal Coordinate Time (UTC).

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeyUsername Property (PGPKeyring Class)

Specifies the name of the user bound to this key.

Syntax

ANSI (Cross Platform)
char* GetPublicKeyUsername(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeyUsername(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeyusername(void* lpObj, int publickeyindex);
QString GetPublicKeyUsername(int iPublicKeyIndex);

Default Value

""

Remarks

Specifies the name of the user bound to this key.

The PGP username is typically represented with a full name and an email address, but generally can be any non-empty string.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeyValid Property (PGPKeyring Class)

Indicates the validity status of the key.

Syntax

ANSI (Cross Platform)
int GetPublicKeyValid(int iPublicKeyIndex);

Unicode (Windows)
INT GetPublicKeyValid(INT iPublicKeyIndex);

Possible Values

PKV_STRICTLY_VALID(0), 
PKV_VALID(1),
PKV_INVALID(2),
PKV_FAILURE(3),
PKV_UNKNOWN(4)
int secureblackbox_pgpkeyring_getpublickeyvalid(void* lpObj, int publickeyindex);
int GetPublicKeyValid(int iPublicKeyIndex);

Default Value

0

Remarks

Indicates the validity status of the key.

pkvStrictlyValid0Strictly valid

pkvValid1Valid

pkvInvalid2Invalid

pkvFailure3Generic validation failure

pkvUnknown4Validity unknown

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

PublicKeyValidTo Property (PGPKeyring Class)

Provide accurate expiration moment indication.

Syntax

ANSI (Cross Platform)
char* GetPublicKeyValidTo(int iPublicKeyIndex);

Unicode (Windows)
LPWSTR GetPublicKeyValidTo(INT iPublicKeyIndex);
char* secureblackbox_pgpkeyring_getpublickeyvalidto(void* lpObj, int publickeyindex);
QString GetPublicKeyValidTo(int iPublicKeyIndex);

Default Value

"0"

Remarks

Provide accurate expiration moment indication. This is different to PublicKeyExpires property which only contains expiration time in days in old keys.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

PublicKeyVersion Property (PGPKeyring Class)

Indicates the key version.

Syntax

ANSI (Cross Platform)
int GetPublicKeyVersion(int iPublicKeyIndex);

Unicode (Windows)
INT GetPublicKeyVersion(INT iPublicKeyIndex);
int secureblackbox_pgpkeyring_getpublickeyversion(void* lpObj, int publickeyindex);
int GetPublicKeyVersion(int iPublicKeyIndex);

Default Value

-1

Remarks

Indicates the key version.

The key version refers to the version of the public-key packet format as defined in RFC 4880.

Only two versions are currently allowed here: 3 and 4. It is recommended that all new keys are created with version of 4.

The PublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the PublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SecretKeyCount Property (PGPKeyring Class)

The number of records in the SecretKey arrays.

Syntax

ANSI (Cross Platform)
int GetSecretKeyCount();

Unicode (Windows)
INT GetSecretKeyCount();
int secureblackbox_pgpkeyring_getsecretkeycount(void* lpObj);
int GetSecretKeyCount();

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at SecretKeyCount - 1.

This property is read-only and not available at design time.

Data Type

Integer

SecretKeyBitsInKey Property (PGPKeyring Class)

Indicates the key length in bits.

Syntax

ANSI (Cross Platform)
int GetSecretKeyBitsInKey(int iSecretKeyIndex);

Unicode (Windows)
INT GetSecretKeyBitsInKey(INT iSecretKeyIndex);
int secureblackbox_pgpkeyring_getsecretkeybitsinkey(void* lpObj, int secretkeyindex);
int GetSecretKeyBitsInKey(int iSecretKeyIndex);

Default Value

2048

Remarks

Indicates the key length in bits.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SecretKeyCanEncrypt Property (PGPKeyring Class)

Returns True if this key can be used for encryption.

Syntax

ANSI (Cross Platform)
int GetSecretKeyCanEncrypt(int iSecretKeyIndex);

Unicode (Windows)
BOOL GetSecretKeyCanEncrypt(INT iSecretKeyIndex);
int secureblackbox_pgpkeyring_getsecretkeycanencrypt(void* lpObj, int secretkeyindex);
bool GetSecretKeyCanEncrypt(int iSecretKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key can be used for encryption.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SecretKeyCanSign Property (PGPKeyring Class)

Returns True if this key can be used for signing.

Syntax

ANSI (Cross Platform)
int GetSecretKeyCanSign(int iSecretKeyIndex);

Unicode (Windows)
BOOL GetSecretKeyCanSign(INT iSecretKeyIndex);
int secureblackbox_pgpkeyring_getsecretkeycansign(void* lpObj, int secretkeyindex);
bool GetSecretKeyCanSign(int iSecretKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key can be used for signing.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SecretKeyCurve Property (PGPKeyring Class)

Indicates the elliptic curve associated with a EC key.

Syntax

ANSI (Cross Platform)
char* GetSecretKeyCurve(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeyCurve(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeycurve(void* lpObj, int secretkeyindex);
QString GetSecretKeyCurve(int iSecretKeyIndex);

Default Value

""

Remarks

Indicates the elliptic curve associated with a EC key.

Supported values:

SB_PGP_CURVE_P256P256
SB_PGP_CURVE_P384P384
SB_PGP_CURVE_P521P521
SB_PGP_CURVE_ED25519ED25519
SB_PGP_CURVE_CURVE25519CURVE25519
SB_PGP_CURVE_BRAINPOOLP256R1BRAINPOOLP256
SB_PGP_CURVE_BRAINPOOLP512R1BRAINPOOLP512

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeyEnabled Property (PGPKeyring Class)

Enables or disables this key for use in encryption or signing operation.

Syntax

ANSI (Cross Platform)
int GetSecretKeyEnabled(int iSecretKeyIndex);

Unicode (Windows)
BOOL GetSecretKeyEnabled(INT iSecretKeyIndex);
int secureblackbox_pgpkeyring_getsecretkeyenabled(void* lpObj, int secretkeyindex);
bool GetSecretKeyEnabled(int iSecretKeyIndex);

Default Value

FALSE

Remarks

Enables or disables this key for use in encryption or signing operation.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SecretKeyEncryptionAlgorithm Property (PGPKeyring Class)

Indicates the symmetric algorithm used to encrypt the secret key.

Syntax

ANSI (Cross Platform)
char* GetSecretKeyEncryptionAlgorithm(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeyEncryptionAlgorithm(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeyencryptionalgorithm(void* lpObj, int secretkeyindex);
QString GetSecretKeyEncryptionAlgorithm(int iSecretKeyIndex);

Default Value

"CAST5"

Remarks

Indicates the symmetric algorithm used to encrypt the secret key.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeyExpires Property (PGPKeyring Class)

Indicates key expiration time in whole days from its generation moment.

Syntax

ANSI (Cross Platform)
int GetSecretKeyExpires(int iSecretKeyIndex);

Unicode (Windows)
INT GetSecretKeyExpires(INT iSecretKeyIndex);
int secureblackbox_pgpkeyring_getsecretkeyexpires(void* lpObj, int secretkeyindex);
int GetSecretKeyExpires(int iSecretKeyIndex);

Default Value

0

Remarks

Indicates key expiration time in whole days from its generation moment. The value of 0 indicates that the key does not expire.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SecretKeyHandle Property (PGPKeyring Class)

Allows to get or set a 'handle', a unique identifier of the underlying property object.

Syntax

ANSI (Cross Platform)
int64 GetSecretKeyHandle(int iSecretKeyIndex);

Unicode (Windows)
LONG64 GetSecretKeyHandle(INT iSecretKeyIndex);
int64 secureblackbox_pgpkeyring_getsecretkeyhandle(void* lpObj, int secretkeyindex);
qint64 GetSecretKeyHandle(int iSecretKeyIndex);

Default Value

0

Remarks

Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.

When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object after such operation. pdfSigner.setSigningCertHandle(certMgr.getCertHandle());

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Long64

SecretKeyHashAlgorithm Property (PGPKeyring Class)

Specifies the hash algorithm associated with the key.

Syntax

ANSI (Cross Platform)
char* GetSecretKeyHashAlgorithm(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeyHashAlgorithm(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeyhashalgorithm(void* lpObj, int secretkeyindex);
QString GetSecretKeyHashAlgorithm(int iSecretKeyIndex);

Default Value

"SHA256"

Remarks

Specifies the hash algorithm associated with the key.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeyIsPublic Property (PGPKeyring Class)

Returns True if this key is a public key, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetSecretKeyIsPublic(int iSecretKeyIndex);

Unicode (Windows)
BOOL GetSecretKeyIsPublic(INT iSecretKeyIndex);
int secureblackbox_pgpkeyring_getsecretkeyispublic(void* lpObj, int secretkeyindex);
bool GetSecretKeyIsPublic(int iSecretKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key is a public key, and False otherwise.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SecretKeyIsSecret Property (PGPKeyring Class)

Returns True if this key is a secret key, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetSecretKeyIsSecret(int iSecretKeyIndex);

Unicode (Windows)
BOOL GetSecretKeyIsSecret(INT iSecretKeyIndex);
int secureblackbox_pgpkeyring_getsecretkeyissecret(void* lpObj, int secretkeyindex);
bool GetSecretKeyIsSecret(int iSecretKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key is a secret key, and False otherwise.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SecretKeyIsSubkey Property (PGPKeyring Class)

Returns True if this key is a subkey of another key, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetSecretKeyIsSubkey(int iSecretKeyIndex);

Unicode (Windows)
BOOL GetSecretKeyIsSubkey(INT iSecretKeyIndex);
int secureblackbox_pgpkeyring_getsecretkeyissubkey(void* lpObj, int secretkeyindex);
bool GetSecretKeyIsSubkey(int iSecretKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key is a subkey of another key, and False otherwise.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SecretKeyKeyFP Property (PGPKeyring Class)

The 20-byte fingerprint (hash value) of this key.

Syntax

ANSI (Cross Platform)
char* GetSecretKeyKeyFP(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeyKeyFP(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeykeyfp(void* lpObj, int secretkeyindex);
QString GetSecretKeyKeyFP(int iSecretKeyIndex);

Default Value

""

Remarks

The 20-byte fingerprint (hash value) of this key.

KeyFP could be used to distinguish two keys with the same KeyID.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeyKeyHashAlgorithm Property (PGPKeyring Class)

Specifies the hash algorithm used with DSA keys to calculate signatures.

Syntax

ANSI (Cross Platform)
char* GetSecretKeyKeyHashAlgorithm(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeyKeyHashAlgorithm(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeykeyhashalgorithm(void* lpObj, int secretkeyindex);
QString GetSecretKeyKeyHashAlgorithm(int iSecretKeyIndex);

Default Value

"SHA256"

Remarks

Specifies the hash algorithm used with DSA keys to calculate signatures.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeyKeyID Property (PGPKeyring Class)

Contains a 8-byte key identifier.

Syntax

ANSI (Cross Platform)
char* GetSecretKeyKeyID(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeyKeyID(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeykeyid(void* lpObj, int secretkeyindex);
QString GetSecretKeyKeyID(int iSecretKeyIndex);

Default Value

""

Remarks

Contains a 8-byte key identifier.

It is quite rare that IDs of two keys collide. If that happens, their fingerprints (KeyFP) can be used for distinguish between the keys. Please note that many PGP implementations show only 4 lowest bytes of the KeyID to the user.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeyOldPacketFormat Property (PGPKeyring Class)

Indicates whether legacy (PGP 2.

Syntax

ANSI (Cross Platform)
int GetSecretKeyOldPacketFormat(int iSecretKeyIndex);

Unicode (Windows)
BOOL GetSecretKeyOldPacketFormat(INT iSecretKeyIndex);
int secureblackbox_pgpkeyring_getsecretkeyoldpacketformat(void* lpObj, int secretkeyindex);
bool GetSecretKeyOldPacketFormat(int iSecretKeyIndex);

Default Value

FALSE

Remarks

Indicates whether legacy (PGP 2.6.x) packet format should be used.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SecretKeyPassphrase Property (PGPKeyring Class)

The key protection password.

Syntax

ANSI (Cross Platform)
char* GetSecretKeyPassphrase(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeyPassphrase(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeypassphrase(void* lpObj, int secretkeyindex);
QString GetSecretKeyPassphrase(int iSecretKeyIndex);

Default Value

""

Remarks

The key protection password.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeyPassphraseValid Property (PGPKeyring Class)

Use this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.

Syntax

ANSI (Cross Platform)
int GetSecretKeyPassphraseValid(int iSecretKeyIndex);

Unicode (Windows)
BOOL GetSecretKeyPassphraseValid(INT iSecretKeyIndex);
int secureblackbox_pgpkeyring_getsecretkeypassphrasevalid(void* lpObj, int secretkeyindex);
bool GetSecretKeyPassphraseValid(int iSecretKeyIndex);

Default Value

FALSE

Remarks

Use this property to check whether the specified SecretKeyPassphrase is valid and can be used to unlock the secret key.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SecretKeyPrimaryKeyID Property (PGPKeyring Class)

If this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.

Syntax

ANSI (Cross Platform)
char* GetSecretKeyPrimaryKeyID(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeyPrimaryKeyID(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeyprimarykeyid(void* lpObj, int secretkeyindex);
QString GetSecretKeyPrimaryKeyID(int iSecretKeyIndex);

Default Value

""

Remarks

If this key is a subkey (SecretKeyIsSubkey returns True), this property contains the identifier of the subkey's primary key.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeyProtection Property (PGPKeyring Class)

Specifies the level of protection applied to the secret key.

Syntax

ANSI (Cross Platform)
int GetSecretKeyProtection(int iSecretKeyIndex);

Unicode (Windows)
INT GetSecretKeyProtection(INT iSecretKeyIndex);

Possible Values

PPT_NONE(0), 
PPT_LOW(1),
PPT_NORMAL(2),
PPT_HIGH(3)
int secureblackbox_pgpkeyring_getsecretkeyprotection(void* lpObj, int secretkeyindex);
int GetSecretKeyProtection(int iSecretKeyIndex);

Default Value

0

Remarks

Specifies the level of protection applied to the secret key.

Allowed values:

pptNone0Key is not encrypted
pptLow1Only the password hash is used to derive the secret key
pptNormal2Password hash with salt is used to derive the secret key
pptHigh3Hash from multiple passwords and salt are used for key derivation

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SecretKeyPublicKeyAlgorithm Property (PGPKeyring Class)

Specifies the asymmetric algorithm of the key.

Syntax

ANSI (Cross Platform)
char* GetSecretKeyPublicKeyAlgorithm(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeyPublicKeyAlgorithm(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeypublickeyalgorithm(void* lpObj, int secretkeyindex);
QString GetSecretKeyPublicKeyAlgorithm(int iSecretKeyIndex);

Default Value

""

Remarks

Specifies the asymmetric algorithm of the key.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeyQBits Property (PGPKeyring Class)

The length of the DSA Q (legitimate range: 160-512).

Syntax

ANSI (Cross Platform)
int GetSecretKeyQBits(int iSecretKeyIndex);

Unicode (Windows)
INT GetSecretKeyQBits(INT iSecretKeyIndex);
int secureblackbox_pgpkeyring_getsecretkeyqbits(void* lpObj, int secretkeyindex);
int GetSecretKeyQBits(int iSecretKeyIndex);

Default Value

0

Remarks

The length of the DSA Q (legitimate range: 160-512).

This parameter corresponds to the hash algorithm used with the key. For example, if the value of Q is 256, SHA-256 will be used.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SecretKeyRevoked Property (PGPKeyring Class)

Returns True if the key has been revoked, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetSecretKeyRevoked(int iSecretKeyIndex);

Unicode (Windows)
BOOL GetSecretKeyRevoked(INT iSecretKeyIndex);
int secureblackbox_pgpkeyring_getsecretkeyrevoked(void* lpObj, int secretkeyindex);
bool GetSecretKeyRevoked(int iSecretKeyIndex);

Default Value

FALSE

Remarks

Returns True if the key has been revoked, and False otherwise.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SecretKeySubkeyFP Property (PGPKeyring Class)

The 20-byte fingerprint (hash value) of this key's subkey.

Syntax

ANSI (Cross Platform)
char* GetSecretKeySubkeyFP(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeySubkeyFP(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeysubkeyfp(void* lpObj, int secretkeyindex);
QString GetSecretKeySubkeyFP(int iSecretKeyIndex);

Default Value

""

Remarks

The 20-byte fingerprint (hash value) of this key's subkey.

KeyFP could be used to distinguish two subkeys with the same SubkeyID.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeySubkeyID Property (PGPKeyring Class)

Contains a 8-byte subkey identifier.

Syntax

ANSI (Cross Platform)
char* GetSecretKeySubkeyID(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeySubkeyID(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeysubkeyid(void* lpObj, int secretkeyindex);
QString GetSecretKeySubkeyID(int iSecretKeyIndex);

Default Value

""

Remarks

Contains a 8-byte subkey identifier.

It is quite rare that IDs of two keys collide. If that happens, their fingerprints (SubkeyFP) can be used to distinguish between the keys. Please note that many PGP implementations show only 4 lowest bytes of the KeyID to the user.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeyTimestamp Property (PGPKeyring Class)

Use this property to check the time the key was generated.

Syntax

ANSI (Cross Platform)
char* GetSecretKeyTimestamp(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeyTimestamp(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeytimestamp(void* lpObj, int secretkeyindex);
QString GetSecretKeyTimestamp(int iSecretKeyIndex);

Default Value

""

Remarks

Use this property to check the time the key was generated. The date and time are stored and retrieved in Universal Coordinate Time (UTC).

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeyUsername Property (PGPKeyring Class)

Specifies the name of the user bound to this key.

Syntax

ANSI (Cross Platform)
char* GetSecretKeyUsername(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeyUsername(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeyusername(void* lpObj, int secretkeyindex);
QString GetSecretKeyUsername(int iSecretKeyIndex);

Default Value

""

Remarks

Specifies the name of the user bound to this key.

The PGP username is typically represented with a full name and an email address, but generally can be any non-empty string.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeyValid Property (PGPKeyring Class)

Indicates the validity status of the key.

Syntax

ANSI (Cross Platform)
int GetSecretKeyValid(int iSecretKeyIndex);

Unicode (Windows)
INT GetSecretKeyValid(INT iSecretKeyIndex);

Possible Values

PKV_STRICTLY_VALID(0), 
PKV_VALID(1),
PKV_INVALID(2),
PKV_FAILURE(3),
PKV_UNKNOWN(4)
int secureblackbox_pgpkeyring_getsecretkeyvalid(void* lpObj, int secretkeyindex);
int GetSecretKeyValid(int iSecretKeyIndex);

Default Value

0

Remarks

Indicates the validity status of the key.

pkvStrictlyValid0Strictly valid

pkvValid1Valid

pkvInvalid2Invalid

pkvFailure3Generic validation failure

pkvUnknown4Validity unknown

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SecretKeyValidTo Property (PGPKeyring Class)

Provide accurate expiration moment indication.

Syntax

ANSI (Cross Platform)
char* GetSecretKeyValidTo(int iSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSecretKeyValidTo(INT iSecretKeyIndex);
char* secureblackbox_pgpkeyring_getsecretkeyvalidto(void* lpObj, int secretkeyindex);
QString GetSecretKeyValidTo(int iSecretKeyIndex);

Default Value

"0"

Remarks

Provide accurate expiration moment indication. This is different to SecretKeyExpires property which only contains expiration time in days in old keys.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SecretKeyVersion Property (PGPKeyring Class)

Indicates the key version.

Syntax

ANSI (Cross Platform)
int GetSecretKeyVersion(int iSecretKeyIndex);

Unicode (Windows)
INT GetSecretKeyVersion(INT iSecretKeyIndex);
int secureblackbox_pgpkeyring_getsecretkeyversion(void* lpObj, int secretkeyindex);
int GetSecretKeyVersion(int iSecretKeyIndex);

Default Value

-1

Remarks

Indicates the key version.

The key version refers to the version of the public-key packet format as defined in RFC 4880.

Only two versions are currently allowed here: 3 and 4. It is recommended that all new keys are created with version of 4.

The SecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SelectedPublicKeyCount Property (PGPKeyring Class)

The number of records in the SelectedPublicKey arrays.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyCount();

Unicode (Windows)
INT GetSelectedPublicKeyCount();
int secureblackbox_pgpkeyring_getselectedpublickeycount(void* lpObj);
int GetSelectedPublicKeyCount();

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at SelectedPublicKeyCount - 1.

This property is read-only and not available at design time.

Data Type

Integer

SelectedPublicKeyBitsInKey Property (PGPKeyring Class)

Indicates the key length in bits.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyBitsInKey(int iSelectedPublicKeyIndex);

Unicode (Windows)
INT GetSelectedPublicKeyBitsInKey(INT iSelectedPublicKeyIndex);
int secureblackbox_pgpkeyring_getselectedpublickeybitsinkey(void* lpObj, int selectedpublickeyindex);
int GetSelectedPublicKeyBitsInKey(int iSelectedPublicKeyIndex);

Default Value

2048

Remarks

Indicates the key length in bits.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SelectedPublicKeyCanEncrypt Property (PGPKeyring Class)

Returns True if this key can be used for encryption.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyCanEncrypt(int iSelectedPublicKeyIndex);

Unicode (Windows)
BOOL GetSelectedPublicKeyCanEncrypt(INT iSelectedPublicKeyIndex);
int secureblackbox_pgpkeyring_getselectedpublickeycanencrypt(void* lpObj, int selectedpublickeyindex);
bool GetSelectedPublicKeyCanEncrypt(int iSelectedPublicKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key can be used for encryption.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedPublicKeyCanSign Property (PGPKeyring Class)

Returns True if this key can be used for signing.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyCanSign(int iSelectedPublicKeyIndex);

Unicode (Windows)
BOOL GetSelectedPublicKeyCanSign(INT iSelectedPublicKeyIndex);
int secureblackbox_pgpkeyring_getselectedpublickeycansign(void* lpObj, int selectedpublickeyindex);
bool GetSelectedPublicKeyCanSign(int iSelectedPublicKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key can be used for signing.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedPublicKeyCurve Property (PGPKeyring Class)

Indicates the elliptic curve associated with a EC key.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeyCurve(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeyCurve(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeycurve(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeyCurve(int iSelectedPublicKeyIndex);

Default Value

""

Remarks

Indicates the elliptic curve associated with a EC key.

Supported values:

SB_PGP_CURVE_P256P256
SB_PGP_CURVE_P384P384
SB_PGP_CURVE_P521P521
SB_PGP_CURVE_ED25519ED25519
SB_PGP_CURVE_CURVE25519CURVE25519
SB_PGP_CURVE_BRAINPOOLP256R1BRAINPOOLP256
SB_PGP_CURVE_BRAINPOOLP512R1BRAINPOOLP512

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeyEnabled Property (PGPKeyring Class)

Enables or disables this key for use in encryption or signing operation.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyEnabled(int iSelectedPublicKeyIndex);

Unicode (Windows)
BOOL GetSelectedPublicKeyEnabled(INT iSelectedPublicKeyIndex);
int secureblackbox_pgpkeyring_getselectedpublickeyenabled(void* lpObj, int selectedpublickeyindex);
bool GetSelectedPublicKeyEnabled(int iSelectedPublicKeyIndex);

Default Value

FALSE

Remarks

Enables or disables this key for use in encryption or signing operation.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedPublicKeyEncryptionAlgorithm Property (PGPKeyring Class)

Indicates the symmetric algorithm used to encrypt the secret key.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeyEncryptionAlgorithm(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeyEncryptionAlgorithm(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeyencryptionalgorithm(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeyEncryptionAlgorithm(int iSelectedPublicKeyIndex);

Default Value

"CAST5"

Remarks

Indicates the symmetric algorithm used to encrypt the secret key.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeyExpires Property (PGPKeyring Class)

Indicates key expiration time in whole days from its generation moment.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyExpires(int iSelectedPublicKeyIndex);

Unicode (Windows)
INT GetSelectedPublicKeyExpires(INT iSelectedPublicKeyIndex);
int secureblackbox_pgpkeyring_getselectedpublickeyexpires(void* lpObj, int selectedpublickeyindex);
int GetSelectedPublicKeyExpires(int iSelectedPublicKeyIndex);

Default Value

0

Remarks

Indicates key expiration time in whole days from its generation moment. The value of 0 indicates that the key does not expire.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SelectedPublicKeyHandle Property (PGPKeyring Class)

Allows to get or set a 'handle', a unique identifier of the underlying property object.

Syntax

ANSI (Cross Platform)
int64 GetSelectedPublicKeyHandle(int iSelectedPublicKeyIndex);

Unicode (Windows)
LONG64 GetSelectedPublicKeyHandle(INT iSelectedPublicKeyIndex);
int64 secureblackbox_pgpkeyring_getselectedpublickeyhandle(void* lpObj, int selectedpublickeyindex);
qint64 GetSelectedPublicKeyHandle(int iSelectedPublicKeyIndex);

Default Value

0

Remarks

Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.

When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object after such operation. pdfSigner.setSigningCertHandle(certMgr.getCertHandle());

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Long64

SelectedPublicKeyHashAlgorithm Property (PGPKeyring Class)

Specifies the hash algorithm associated with the key.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeyHashAlgorithm(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeyHashAlgorithm(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeyhashalgorithm(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeyHashAlgorithm(int iSelectedPublicKeyIndex);

Default Value

"SHA256"

Remarks

Specifies the hash algorithm associated with the key.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeyIsPublic Property (PGPKeyring Class)

Returns True if this key is a public key, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyIsPublic(int iSelectedPublicKeyIndex);

Unicode (Windows)
BOOL GetSelectedPublicKeyIsPublic(INT iSelectedPublicKeyIndex);
int secureblackbox_pgpkeyring_getselectedpublickeyispublic(void* lpObj, int selectedpublickeyindex);
bool GetSelectedPublicKeyIsPublic(int iSelectedPublicKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key is a public key, and False otherwise.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedPublicKeyIsSecret Property (PGPKeyring Class)

Returns True if this key is a secret key, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyIsSecret(int iSelectedPublicKeyIndex);

Unicode (Windows)
BOOL GetSelectedPublicKeyIsSecret(INT iSelectedPublicKeyIndex);
int secureblackbox_pgpkeyring_getselectedpublickeyissecret(void* lpObj, int selectedpublickeyindex);
bool GetSelectedPublicKeyIsSecret(int iSelectedPublicKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key is a secret key, and False otherwise.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedPublicKeyIsSubkey Property (PGPKeyring Class)

Returns True if this key is a subkey of another key, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyIsSubkey(int iSelectedPublicKeyIndex);

Unicode (Windows)
BOOL GetSelectedPublicKeyIsSubkey(INT iSelectedPublicKeyIndex);
int secureblackbox_pgpkeyring_getselectedpublickeyissubkey(void* lpObj, int selectedpublickeyindex);
bool GetSelectedPublicKeyIsSubkey(int iSelectedPublicKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key is a subkey of another key, and False otherwise.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedPublicKeyKeyFP Property (PGPKeyring Class)

The 20-byte fingerprint (hash value) of this key.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeyKeyFP(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeyKeyFP(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeykeyfp(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeyKeyFP(int iSelectedPublicKeyIndex);

Default Value

""

Remarks

The 20-byte fingerprint (hash value) of this key.

KeyFP could be used to distinguish two keys with the same KeyID.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeyKeyHashAlgorithm Property (PGPKeyring Class)

Specifies the hash algorithm used with DSA keys to calculate signatures.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeyKeyHashAlgorithm(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeyKeyHashAlgorithm(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeykeyhashalgorithm(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeyKeyHashAlgorithm(int iSelectedPublicKeyIndex);

Default Value

"SHA256"

Remarks

Specifies the hash algorithm used with DSA keys to calculate signatures.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeyKeyID Property (PGPKeyring Class)

Contains a 8-byte key identifier.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeyKeyID(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeyKeyID(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeykeyid(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeyKeyID(int iSelectedPublicKeyIndex);

Default Value

""

Remarks

Contains a 8-byte key identifier.

It is quite rare that IDs of two keys collide. If that happens, their fingerprints (KeyFP) can be used for distinguish between the keys. Please note that many PGP implementations show only 4 lowest bytes of the KeyID to the user.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeyOldPacketFormat Property (PGPKeyring Class)

Indicates whether legacy (PGP 2.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyOldPacketFormat(int iSelectedPublicKeyIndex);

Unicode (Windows)
BOOL GetSelectedPublicKeyOldPacketFormat(INT iSelectedPublicKeyIndex);
int secureblackbox_pgpkeyring_getselectedpublickeyoldpacketformat(void* lpObj, int selectedpublickeyindex);
bool GetSelectedPublicKeyOldPacketFormat(int iSelectedPublicKeyIndex);

Default Value

FALSE

Remarks

Indicates whether legacy (PGP 2.6.x) packet format should be used.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedPublicKeyPassphrase Property (PGPKeyring Class)

The key protection password.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeyPassphrase(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeyPassphrase(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeypassphrase(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeyPassphrase(int iSelectedPublicKeyIndex);

Default Value

""

Remarks

The key protection password.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeyPassphraseValid Property (PGPKeyring Class)

Use this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyPassphraseValid(int iSelectedPublicKeyIndex);

Unicode (Windows)
BOOL GetSelectedPublicKeyPassphraseValid(INT iSelectedPublicKeyIndex);
int secureblackbox_pgpkeyring_getselectedpublickeypassphrasevalid(void* lpObj, int selectedpublickeyindex);
bool GetSelectedPublicKeyPassphraseValid(int iSelectedPublicKeyIndex);

Default Value

FALSE

Remarks

Use this property to check whether the specified SelectedPublicKeyPassphrase is valid and can be used to unlock the secret key.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedPublicKeyPrimaryKeyID Property (PGPKeyring Class)

If this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeyPrimaryKeyID(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeyPrimaryKeyID(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeyprimarykeyid(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeyPrimaryKeyID(int iSelectedPublicKeyIndex);

Default Value

""

Remarks

If this key is a subkey (SelectedPublicKeyIsSubkey returns True), this property contains the identifier of the subkey's primary key.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeyProtection Property (PGPKeyring Class)

Specifies the level of protection applied to the secret key.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyProtection(int iSelectedPublicKeyIndex);

Unicode (Windows)
INT GetSelectedPublicKeyProtection(INT iSelectedPublicKeyIndex);

Possible Values

PPT_NONE(0), 
PPT_LOW(1),
PPT_NORMAL(2),
PPT_HIGH(3)
int secureblackbox_pgpkeyring_getselectedpublickeyprotection(void* lpObj, int selectedpublickeyindex);
int GetSelectedPublicKeyProtection(int iSelectedPublicKeyIndex);

Default Value

0

Remarks

Specifies the level of protection applied to the secret key.

Allowed values:

pptNone0Key is not encrypted
pptLow1Only the password hash is used to derive the secret key
pptNormal2Password hash with salt is used to derive the secret key
pptHigh3Hash from multiple passwords and salt are used for key derivation

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SelectedPublicKeyPublicKeyAlgorithm Property (PGPKeyring Class)

Specifies the asymmetric algorithm of the key.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeyPublicKeyAlgorithm(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeyPublicKeyAlgorithm(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeypublickeyalgorithm(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeyPublicKeyAlgorithm(int iSelectedPublicKeyIndex);

Default Value

""

Remarks

Specifies the asymmetric algorithm of the key.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeyQBits Property (PGPKeyring Class)

The length of the DSA Q (legitimate range: 160-512).

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyQBits(int iSelectedPublicKeyIndex);

Unicode (Windows)
INT GetSelectedPublicKeyQBits(INT iSelectedPublicKeyIndex);
int secureblackbox_pgpkeyring_getselectedpublickeyqbits(void* lpObj, int selectedpublickeyindex);
int GetSelectedPublicKeyQBits(int iSelectedPublicKeyIndex);

Default Value

0

Remarks

The length of the DSA Q (legitimate range: 160-512).

This parameter corresponds to the hash algorithm used with the key. For example, if the value of Q is 256, SHA-256 will be used.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SelectedPublicKeyRevoked Property (PGPKeyring Class)

Returns True if the key has been revoked, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyRevoked(int iSelectedPublicKeyIndex);

Unicode (Windows)
BOOL GetSelectedPublicKeyRevoked(INT iSelectedPublicKeyIndex);
int secureblackbox_pgpkeyring_getselectedpublickeyrevoked(void* lpObj, int selectedpublickeyindex);
bool GetSelectedPublicKeyRevoked(int iSelectedPublicKeyIndex);

Default Value

FALSE

Remarks

Returns True if the key has been revoked, and False otherwise.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedPublicKeySubkeyFP Property (PGPKeyring Class)

The 20-byte fingerprint (hash value) of this key's subkey.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeySubkeyFP(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeySubkeyFP(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeysubkeyfp(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeySubkeyFP(int iSelectedPublicKeyIndex);

Default Value

""

Remarks

The 20-byte fingerprint (hash value) of this key's subkey.

KeyFP could be used to distinguish two subkeys with the same SubkeyID.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeySubkeyID Property (PGPKeyring Class)

Contains a 8-byte subkey identifier.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeySubkeyID(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeySubkeyID(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeysubkeyid(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeySubkeyID(int iSelectedPublicKeyIndex);

Default Value

""

Remarks

Contains a 8-byte subkey identifier.

It is quite rare that IDs of two keys collide. If that happens, their fingerprints (SubkeyFP) can be used to distinguish between the keys. Please note that many PGP implementations show only 4 lowest bytes of the KeyID to the user.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeyTimestamp Property (PGPKeyring Class)

Use this property to check the time the key was generated.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeyTimestamp(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeyTimestamp(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeytimestamp(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeyTimestamp(int iSelectedPublicKeyIndex);

Default Value

""

Remarks

Use this property to check the time the key was generated. The date and time are stored and retrieved in Universal Coordinate Time (UTC).

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeyUsername Property (PGPKeyring Class)

Specifies the name of the user bound to this key.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeyUsername(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeyUsername(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeyusername(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeyUsername(int iSelectedPublicKeyIndex);

Default Value

""

Remarks

Specifies the name of the user bound to this key.

The PGP username is typically represented with a full name and an email address, but generally can be any non-empty string.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeyValid Property (PGPKeyring Class)

Indicates the validity status of the key.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyValid(int iSelectedPublicKeyIndex);

Unicode (Windows)
INT GetSelectedPublicKeyValid(INT iSelectedPublicKeyIndex);

Possible Values

PKV_STRICTLY_VALID(0), 
PKV_VALID(1),
PKV_INVALID(2),
PKV_FAILURE(3),
PKV_UNKNOWN(4)
int secureblackbox_pgpkeyring_getselectedpublickeyvalid(void* lpObj, int selectedpublickeyindex);
int GetSelectedPublicKeyValid(int iSelectedPublicKeyIndex);

Default Value

0

Remarks

Indicates the validity status of the key.

pkvStrictlyValid0Strictly valid

pkvValid1Valid

pkvInvalid2Invalid

pkvFailure3Generic validation failure

pkvUnknown4Validity unknown

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SelectedPublicKeyValidTo Property (PGPKeyring Class)

Provide accurate expiration moment indication.

Syntax

ANSI (Cross Platform)
char* GetSelectedPublicKeyValidTo(int iSelectedPublicKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedPublicKeyValidTo(INT iSelectedPublicKeyIndex);
char* secureblackbox_pgpkeyring_getselectedpublickeyvalidto(void* lpObj, int selectedpublickeyindex);
QString GetSelectedPublicKeyValidTo(int iSelectedPublicKeyIndex);

Default Value

"0"

Remarks

Provide accurate expiration moment indication. This is different to SelectedPublicKeyExpires property which only contains expiration time in days in old keys.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedPublicKeyVersion Property (PGPKeyring Class)

Indicates the key version.

Syntax

ANSI (Cross Platform)
int GetSelectedPublicKeyVersion(int iSelectedPublicKeyIndex);

Unicode (Windows)
INT GetSelectedPublicKeyVersion(INT iSelectedPublicKeyIndex);
int secureblackbox_pgpkeyring_getselectedpublickeyversion(void* lpObj, int selectedpublickeyindex);
int GetSelectedPublicKeyVersion(int iSelectedPublicKeyIndex);

Default Value

-1

Remarks

Indicates the key version.

The key version refers to the version of the public-key packet format as defined in RFC 4880.

Only two versions are currently allowed here: 3 and 4. It is recommended that all new keys are created with version of 4.

The SelectedPublicKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedPublicKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SelectedSecretKeyCount Property (PGPKeyring Class)

The number of records in the SelectedSecretKey arrays.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyCount();

Unicode (Windows)
INT GetSelectedSecretKeyCount();
int secureblackbox_pgpkeyring_getselectedsecretkeycount(void* lpObj);
int GetSelectedSecretKeyCount();

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at SelectedSecretKeyCount - 1.

This property is read-only and not available at design time.

Data Type

Integer

SelectedSecretKeyBitsInKey Property (PGPKeyring Class)

Indicates the key length in bits.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyBitsInKey(int iSelectedSecretKeyIndex);

Unicode (Windows)
INT GetSelectedSecretKeyBitsInKey(INT iSelectedSecretKeyIndex);
int secureblackbox_pgpkeyring_getselectedsecretkeybitsinkey(void* lpObj, int selectedsecretkeyindex);
int GetSelectedSecretKeyBitsInKey(int iSelectedSecretKeyIndex);

Default Value

2048

Remarks

Indicates the key length in bits.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SelectedSecretKeyCanEncrypt Property (PGPKeyring Class)

Returns True if this key can be used for encryption.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyCanEncrypt(int iSelectedSecretKeyIndex);

Unicode (Windows)
BOOL GetSelectedSecretKeyCanEncrypt(INT iSelectedSecretKeyIndex);
int secureblackbox_pgpkeyring_getselectedsecretkeycanencrypt(void* lpObj, int selectedsecretkeyindex);
bool GetSelectedSecretKeyCanEncrypt(int iSelectedSecretKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key can be used for encryption.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedSecretKeyCanSign Property (PGPKeyring Class)

Returns True if this key can be used for signing.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyCanSign(int iSelectedSecretKeyIndex);

Unicode (Windows)
BOOL GetSelectedSecretKeyCanSign(INT iSelectedSecretKeyIndex);
int secureblackbox_pgpkeyring_getselectedsecretkeycansign(void* lpObj, int selectedsecretkeyindex);
bool GetSelectedSecretKeyCanSign(int iSelectedSecretKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key can be used for signing.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedSecretKeyCurve Property (PGPKeyring Class)

Indicates the elliptic curve associated with a EC key.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeyCurve(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeyCurve(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeycurve(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeyCurve(int iSelectedSecretKeyIndex);

Default Value

""

Remarks

Indicates the elliptic curve associated with a EC key.

Supported values:

SB_PGP_CURVE_P256P256
SB_PGP_CURVE_P384P384
SB_PGP_CURVE_P521P521
SB_PGP_CURVE_ED25519ED25519
SB_PGP_CURVE_CURVE25519CURVE25519
SB_PGP_CURVE_BRAINPOOLP256R1BRAINPOOLP256
SB_PGP_CURVE_BRAINPOOLP512R1BRAINPOOLP512

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeyEnabled Property (PGPKeyring Class)

Enables or disables this key for use in encryption or signing operation.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyEnabled(int iSelectedSecretKeyIndex);

Unicode (Windows)
BOOL GetSelectedSecretKeyEnabled(INT iSelectedSecretKeyIndex);
int secureblackbox_pgpkeyring_getselectedsecretkeyenabled(void* lpObj, int selectedsecretkeyindex);
bool GetSelectedSecretKeyEnabled(int iSelectedSecretKeyIndex);

Default Value

FALSE

Remarks

Enables or disables this key for use in encryption or signing operation.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedSecretKeyEncryptionAlgorithm Property (PGPKeyring Class)

Indicates the symmetric algorithm used to encrypt the secret key.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeyEncryptionAlgorithm(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeyEncryptionAlgorithm(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeyencryptionalgorithm(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeyEncryptionAlgorithm(int iSelectedSecretKeyIndex);

Default Value

"CAST5"

Remarks

Indicates the symmetric algorithm used to encrypt the secret key.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeyExpires Property (PGPKeyring Class)

Indicates key expiration time in whole days from its generation moment.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyExpires(int iSelectedSecretKeyIndex);

Unicode (Windows)
INT GetSelectedSecretKeyExpires(INT iSelectedSecretKeyIndex);
int secureblackbox_pgpkeyring_getselectedsecretkeyexpires(void* lpObj, int selectedsecretkeyindex);
int GetSelectedSecretKeyExpires(int iSelectedSecretKeyIndex);

Default Value

0

Remarks

Indicates key expiration time in whole days from its generation moment. The value of 0 indicates that the key does not expire.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SelectedSecretKeyHandle Property (PGPKeyring Class)

Allows to get or set a 'handle', a unique identifier of the underlying property object.

Syntax

ANSI (Cross Platform)
int64 GetSelectedSecretKeyHandle(int iSelectedSecretKeyIndex);

Unicode (Windows)
LONG64 GetSelectedSecretKeyHandle(INT iSelectedSecretKeyIndex);
int64 secureblackbox_pgpkeyring_getselectedsecretkeyhandle(void* lpObj, int selectedsecretkeyindex);
qint64 GetSelectedSecretKeyHandle(int iSelectedSecretKeyIndex);

Default Value

0

Remarks

Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise.

When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object after such operation. pdfSigner.setSigningCertHandle(certMgr.getCertHandle());

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Long64

SelectedSecretKeyHashAlgorithm Property (PGPKeyring Class)

Specifies the hash algorithm associated with the key.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeyHashAlgorithm(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeyHashAlgorithm(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeyhashalgorithm(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeyHashAlgorithm(int iSelectedSecretKeyIndex);

Default Value

"SHA256"

Remarks

Specifies the hash algorithm associated with the key.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeyIsPublic Property (PGPKeyring Class)

Returns True if this key is a public key, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyIsPublic(int iSelectedSecretKeyIndex);

Unicode (Windows)
BOOL GetSelectedSecretKeyIsPublic(INT iSelectedSecretKeyIndex);
int secureblackbox_pgpkeyring_getselectedsecretkeyispublic(void* lpObj, int selectedsecretkeyindex);
bool GetSelectedSecretKeyIsPublic(int iSelectedSecretKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key is a public key, and False otherwise.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedSecretKeyIsSecret Property (PGPKeyring Class)

Returns True if this key is a secret key, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyIsSecret(int iSelectedSecretKeyIndex);

Unicode (Windows)
BOOL GetSelectedSecretKeyIsSecret(INT iSelectedSecretKeyIndex);
int secureblackbox_pgpkeyring_getselectedsecretkeyissecret(void* lpObj, int selectedsecretkeyindex);
bool GetSelectedSecretKeyIsSecret(int iSelectedSecretKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key is a secret key, and False otherwise.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedSecretKeyIsSubkey Property (PGPKeyring Class)

Returns True if this key is a subkey of another key, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyIsSubkey(int iSelectedSecretKeyIndex);

Unicode (Windows)
BOOL GetSelectedSecretKeyIsSubkey(INT iSelectedSecretKeyIndex);
int secureblackbox_pgpkeyring_getselectedsecretkeyissubkey(void* lpObj, int selectedsecretkeyindex);
bool GetSelectedSecretKeyIsSubkey(int iSelectedSecretKeyIndex);

Default Value

FALSE

Remarks

Returns True if this key is a subkey of another key, and False otherwise.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedSecretKeyKeyFP Property (PGPKeyring Class)

The 20-byte fingerprint (hash value) of this key.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeyKeyFP(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeyKeyFP(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeykeyfp(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeyKeyFP(int iSelectedSecretKeyIndex);

Default Value

""

Remarks

The 20-byte fingerprint (hash value) of this key.

KeyFP could be used to distinguish two keys with the same KeyID.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeyKeyHashAlgorithm Property (PGPKeyring Class)

Specifies the hash algorithm used with DSA keys to calculate signatures.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeyKeyHashAlgorithm(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeyKeyHashAlgorithm(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeykeyhashalgorithm(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeyKeyHashAlgorithm(int iSelectedSecretKeyIndex);

Default Value

"SHA256"

Remarks

Specifies the hash algorithm used with DSA keys to calculate signatures.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeyKeyID Property (PGPKeyring Class)

Contains a 8-byte key identifier.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeyKeyID(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeyKeyID(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeykeyid(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeyKeyID(int iSelectedSecretKeyIndex);

Default Value

""

Remarks

Contains a 8-byte key identifier.

It is quite rare that IDs of two keys collide. If that happens, their fingerprints (KeyFP) can be used for distinguish between the keys. Please note that many PGP implementations show only 4 lowest bytes of the KeyID to the user.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeyOldPacketFormat Property (PGPKeyring Class)

Indicates whether legacy (PGP 2.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyOldPacketFormat(int iSelectedSecretKeyIndex);

Unicode (Windows)
BOOL GetSelectedSecretKeyOldPacketFormat(INT iSelectedSecretKeyIndex);
int secureblackbox_pgpkeyring_getselectedsecretkeyoldpacketformat(void* lpObj, int selectedsecretkeyindex);
bool GetSelectedSecretKeyOldPacketFormat(int iSelectedSecretKeyIndex);

Default Value

FALSE

Remarks

Indicates whether legacy (PGP 2.6.x) packet format should be used.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedSecretKeyPassphrase Property (PGPKeyring Class)

The key protection password.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeyPassphrase(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeyPassphrase(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeypassphrase(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeyPassphrase(int iSelectedSecretKeyIndex);

Default Value

""

Remarks

The key protection password.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeyPassphraseValid Property (PGPKeyring Class)

Use this property to check whether the specified Passphrase is valid and can be used to unlock the secret key.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyPassphraseValid(int iSelectedSecretKeyIndex);

Unicode (Windows)
BOOL GetSelectedSecretKeyPassphraseValid(INT iSelectedSecretKeyIndex);
int secureblackbox_pgpkeyring_getselectedsecretkeypassphrasevalid(void* lpObj, int selectedsecretkeyindex);
bool GetSelectedSecretKeyPassphraseValid(int iSelectedSecretKeyIndex);

Default Value

FALSE

Remarks

Use this property to check whether the specified SelectedSecretKeyPassphrase is valid and can be used to unlock the secret key.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedSecretKeyPrimaryKeyID Property (PGPKeyring Class)

If this key is a subkey ( IsSubkey returns True), this property contains the identifier of the subkey's primary key.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeyPrimaryKeyID(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeyPrimaryKeyID(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeyprimarykeyid(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeyPrimaryKeyID(int iSelectedSecretKeyIndex);

Default Value

""

Remarks

If this key is a subkey (SelectedSecretKeyIsSubkey returns True), this property contains the identifier of the subkey's primary key.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeyProtection Property (PGPKeyring Class)

Specifies the level of protection applied to the secret key.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyProtection(int iSelectedSecretKeyIndex);

Unicode (Windows)
INT GetSelectedSecretKeyProtection(INT iSelectedSecretKeyIndex);

Possible Values

PPT_NONE(0), 
PPT_LOW(1),
PPT_NORMAL(2),
PPT_HIGH(3)
int secureblackbox_pgpkeyring_getselectedsecretkeyprotection(void* lpObj, int selectedsecretkeyindex);
int GetSelectedSecretKeyProtection(int iSelectedSecretKeyIndex);

Default Value

0

Remarks

Specifies the level of protection applied to the secret key.

Allowed values:

pptNone0Key is not encrypted
pptLow1Only the password hash is used to derive the secret key
pptNormal2Password hash with salt is used to derive the secret key
pptHigh3Hash from multiple passwords and salt are used for key derivation

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SelectedSecretKeyPublicKeyAlgorithm Property (PGPKeyring Class)

Specifies the asymmetric algorithm of the key.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeyPublicKeyAlgorithm(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeyPublicKeyAlgorithm(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeypublickeyalgorithm(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeyPublicKeyAlgorithm(int iSelectedSecretKeyIndex);

Default Value

""

Remarks

Specifies the asymmetric algorithm of the key.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeyQBits Property (PGPKeyring Class)

The length of the DSA Q (legitimate range: 160-512).

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyQBits(int iSelectedSecretKeyIndex);

Unicode (Windows)
INT GetSelectedSecretKeyQBits(INT iSelectedSecretKeyIndex);
int secureblackbox_pgpkeyring_getselectedsecretkeyqbits(void* lpObj, int selectedsecretkeyindex);
int GetSelectedSecretKeyQBits(int iSelectedSecretKeyIndex);

Default Value

0

Remarks

The length of the DSA Q (legitimate range: 160-512).

This parameter corresponds to the hash algorithm used with the key. For example, if the value of Q is 256, SHA-256 will be used.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SelectedSecretKeyRevoked Property (PGPKeyring Class)

Returns True if the key has been revoked, and False otherwise.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyRevoked(int iSelectedSecretKeyIndex);

Unicode (Windows)
BOOL GetSelectedSecretKeyRevoked(INT iSelectedSecretKeyIndex);
int secureblackbox_pgpkeyring_getselectedsecretkeyrevoked(void* lpObj, int selectedsecretkeyindex);
bool GetSelectedSecretKeyRevoked(int iSelectedSecretKeyIndex);

Default Value

FALSE

Remarks

Returns True if the key has been revoked, and False otherwise.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Boolean

SelectedSecretKeySubkeyFP Property (PGPKeyring Class)

The 20-byte fingerprint (hash value) of this key's subkey.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeySubkeyFP(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeySubkeyFP(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeysubkeyfp(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeySubkeyFP(int iSelectedSecretKeyIndex);

Default Value

""

Remarks

The 20-byte fingerprint (hash value) of this key's subkey.

KeyFP could be used to distinguish two subkeys with the same SubkeyID.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeySubkeyID Property (PGPKeyring Class)

Contains a 8-byte subkey identifier.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeySubkeyID(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeySubkeyID(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeysubkeyid(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeySubkeyID(int iSelectedSecretKeyIndex);

Default Value

""

Remarks

Contains a 8-byte subkey identifier.

It is quite rare that IDs of two keys collide. If that happens, their fingerprints (SubkeyFP) can be used to distinguish between the keys. Please note that many PGP implementations show only 4 lowest bytes of the KeyID to the user.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeyTimestamp Property (PGPKeyring Class)

Use this property to check the time the key was generated.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeyTimestamp(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeyTimestamp(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeytimestamp(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeyTimestamp(int iSelectedSecretKeyIndex);

Default Value

""

Remarks

Use this property to check the time the key was generated. The date and time are stored and retrieved in Universal Coordinate Time (UTC).

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeyUsername Property (PGPKeyring Class)

Specifies the name of the user bound to this key.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeyUsername(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeyUsername(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeyusername(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeyUsername(int iSelectedSecretKeyIndex);

Default Value

""

Remarks

Specifies the name of the user bound to this key.

The PGP username is typically represented with a full name and an email address, but generally can be any non-empty string.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeyValid Property (PGPKeyring Class)

Indicates the validity status of the key.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyValid(int iSelectedSecretKeyIndex);

Unicode (Windows)
INT GetSelectedSecretKeyValid(INT iSelectedSecretKeyIndex);

Possible Values

PKV_STRICTLY_VALID(0), 
PKV_VALID(1),
PKV_INVALID(2),
PKV_FAILURE(3),
PKV_UNKNOWN(4)
int secureblackbox_pgpkeyring_getselectedsecretkeyvalid(void* lpObj, int selectedsecretkeyindex);
int GetSelectedSecretKeyValid(int iSelectedSecretKeyIndex);

Default Value

0

Remarks

Indicates the validity status of the key.

pkvStrictlyValid0Strictly valid

pkvValid1Valid

pkvInvalid2Invalid

pkvFailure3Generic validation failure

pkvUnknown4Validity unknown

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

SelectedSecretKeyValidTo Property (PGPKeyring Class)

Provide accurate expiration moment indication.

Syntax

ANSI (Cross Platform)
char* GetSelectedSecretKeyValidTo(int iSelectedSecretKeyIndex);

Unicode (Windows)
LPWSTR GetSelectedSecretKeyValidTo(INT iSelectedSecretKeyIndex);
char* secureblackbox_pgpkeyring_getselectedsecretkeyvalidto(void* lpObj, int selectedsecretkeyindex);
QString GetSelectedSecretKeyValidTo(int iSelectedSecretKeyIndex);

Default Value

"0"

Remarks

Provide accurate expiration moment indication. This is different to SelectedSecretKeyExpires property which only contains expiration time in days in old keys.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

String

SelectedSecretKeyVersion Property (PGPKeyring Class)

Indicates the key version.

Syntax

ANSI (Cross Platform)
int GetSelectedSecretKeyVersion(int iSelectedSecretKeyIndex);

Unicode (Windows)
INT GetSelectedSecretKeyVersion(INT iSelectedSecretKeyIndex);
int secureblackbox_pgpkeyring_getselectedsecretkeyversion(void* lpObj, int selectedsecretkeyindex);
int GetSelectedSecretKeyVersion(int iSelectedSecretKeyIndex);

Default Value

-1

Remarks

Indicates the key version.

The key version refers to the version of the public-key packet format as defined in RFC 4880.

Only two versions are currently allowed here: 3 and 4. It is recommended that all new keys are created with version of 4.

The SelectedSecretKeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the SelectedSecretKeyCount property.

This property is read-only and not available at design time.

Data Type

Integer

AddFromBytes Method (PGPKeyring Class)

Adds an existing key to the keyring.

Syntax

ANSI (Cross Platform)
int AddFromBytes(const char* lpBytes, int lenBytes);

Unicode (Windows)
INT AddFromBytes(LPCSTR lpBytes, INT lenBytes);
int secureblackbox_pgpkeyring_addfrombytes(void* lpObj, const char* lpBytes, int lenBytes);
int AddFromBytes(QByteArray qbaBytes);

Remarks

Use this method to add a key stored in a byte array to the keyring.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

AddFromFile Method (PGPKeyring Class)

Adds an existing key to the keyring.

Syntax

ANSI (Cross Platform)
int AddFromFile(const char* lpszFilename);

Unicode (Windows)
INT AddFromFile(LPCWSTR lpszFilename);
int secureblackbox_pgpkeyring_addfromfile(void* lpObj, const char* lpszFilename);
int AddFromFile(const QString& qsFilename);

Remarks

Use this method to add a key stored in a file to the keyring.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

AddFromFiles Method (PGPKeyring Class)

Adds a collection of keys to the keyring.

Syntax

ANSI (Cross Platform)
int AddFromFiles(const char* lpszPublicKeyringFile, const char* lpszSecretKeyringFile);

Unicode (Windows)
INT AddFromFiles(LPCWSTR lpszPublicKeyringFile, LPCWSTR lpszSecretKeyringFile);
int secureblackbox_pgpkeyring_addfromfiles(void* lpObj, const char* lpszPublicKeyringFile, const char* lpszSecretKeyringFile);
int AddFromFiles(const QString& qsPublicKeyringFile, const QString& qsSecretKeyringFile);

Remarks

Use this method to add keys stored in two separate keyring files to the keyring.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

AddFromStream Method (PGPKeyring Class)

Adds a key to the keyring.

Syntax

ANSI (Cross Platform)
int AddFromStream(SecureBlackboxStream* sStream);

Unicode (Windows)
INT AddFromStream(SecureBlackboxStream* sStream);
int secureblackbox_pgpkeyring_addfromstream(void* lpObj, SecureBlackboxStream* sStream);
int AddFromStream(SecureBlackboxStream* sStream);

Remarks

Use this method to add a key contained in Stream to the keyring.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

AddFromStreams Method (PGPKeyring Class)

Adds a collection of keys to the keyring.

Syntax

ANSI (Cross Platform)
int AddFromStreams(SecureBlackboxStream* sPublicKeyringStream, SecureBlackboxStream* sSecretKeyringStream);

Unicode (Windows)
INT AddFromStreams(SecureBlackboxStream* sPublicKeyringStream, SecureBlackboxStream* sSecretKeyringStream);
int secureblackbox_pgpkeyring_addfromstreams(void* lpObj, SecureBlackboxStream* sPublicKeyringStream, SecureBlackboxStream* sSecretKeyringStream);
int AddFromStreams(SecureBlackboxStream* sPublicKeyringStream, SecureBlackboxStream* sSecretKeyringStream);

Remarks

Use this method to add keys stored in two separate keyring streams to the keyring.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

AddPinned Method (PGPKeyring Class)

Adds a pinned secret key to the keyring.

Syntax

ANSI (Cross Platform)
int AddPinned();

Unicode (Windows)
INT AddPinned();
int secureblackbox_pgpkeyring_addpinned(void* lpObj);
int AddPinned();

Remarks

Use this method to add a key provided via PinnedKey to the keyring. This can be a public or secret key.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Clear Method (PGPKeyring Class)

Removes all the keys from the keyring.

Syntax

ANSI (Cross Platform)
int Clear();

Unicode (Windows)
INT Clear();
int secureblackbox_pgpkeyring_clear(void* lpObj);
int Clear();

Remarks

Use this method to remove all the items from the keyring.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Close Method (PGPKeyring Class)

Closes the keyring.

Syntax

ANSI (Cross Platform)
int Close();

Unicode (Windows)
INT Close();
int secureblackbox_pgpkeyring_close(void* lpObj);
int Close();

Remarks

Use this method to close the keyring and release any associated memory resources.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Config Method (PGPKeyring Class)

Sets or retrieves a configuration setting.

Syntax

ANSI (Cross Platform)
char* Config(const char* lpszConfigurationString);

Unicode (Windows)
LPWSTR Config(LPCWSTR lpszConfigurationString);
char* secureblackbox_pgpkeyring_config(void* lpObj, const char* lpszConfigurationString);
QString Config(const QString& qsConfigurationString);

Remarks

Config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.

Error Handling (C++)

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

CreateNew Method (PGPKeyring Class)

Creates a new empty keyring.

Syntax

ANSI (Cross Platform)
int CreateNew();

Unicode (Windows)
INT CreateNew();
int secureblackbox_pgpkeyring_createnew(void* lpObj);
int CreateNew();

Remarks

Use this method to initialize a new empty keyring.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

DoAction Method (PGPKeyring Class)

Performs an additional action.

Syntax

ANSI (Cross Platform)
char* DoAction(const char* lpszActionID, const char* lpszActionParams);

Unicode (Windows)
LPWSTR DoAction(LPCWSTR lpszActionID, LPCWSTR lpszActionParams);
char* secureblackbox_pgpkeyring_doaction(void* lpObj, const char* lpszActionID, const char* lpszActionParams);
QString DoAction(const QString& qsActionID, const QString& qsActionParams);

Remarks

DoAction is a generic method available in every class. It is used to perform an additional action introduced after the product major release. The list of actions is not fixed, and may be flexibly extended over time.

The unique identifier (case insencitive) of the action is provided in the ActionID parameter.

ActionParams contains the value of a single parameter, or a list of multiple parameters for the action in the form of PARAM1=VALUE1;PARAM2=VALUE2;....

Error Handling (C++)

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

Load Method (PGPKeyring Class)

Loads a keyring from disk.

Syntax

ANSI (Cross Platform)
int Load(const char* lpszPublicKeyringFile, const char* lpszSecretKeyringFile);

Unicode (Windows)
INT Load(LPCWSTR lpszPublicKeyringFile, LPCWSTR lpszSecretKeyringFile);
int secureblackbox_pgpkeyring_load(void* lpObj, const char* lpszPublicKeyringFile, const char* lpszSecretKeyringFile);
int Load(const QString& qsPublicKeyringFile, const QString& qsSecretKeyringFile);

Remarks

Use this method to load a keyring (usually stored in two files) to the keyring object. If you only have it in one file, pass an empty string as the second parameter.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

LoadFromBytes Method (PGPKeyring Class)

Loads a keyring from two byte arrays.

Syntax

ANSI (Cross Platform)
int LoadFromBytes(const char* lpPublicKeyring, int lenPublicKeyring, const char* lpSecretKeyring, int lenSecretKeyring);

Unicode (Windows)
INT LoadFromBytes(LPCSTR lpPublicKeyring, INT lenPublicKeyring, LPCSTR lpSecretKeyring, INT lenSecretKeyring);
int secureblackbox_pgpkeyring_loadfrombytes(void* lpObj, const char* lpPublicKeyring, int lenPublicKeyring, const char* lpSecretKeyring, int lenSecretKeyring);
int LoadFromBytes(QByteArray qbaPublicKeyring, QByteArray qbaSecretKeyring);

Remarks

Use this method to load a keyring from two byte arrays. Keyring are typically stored in the form of two files (public and secret), but if you only have one file, pass an empty array as the second parameter.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

LoadFromStreams Method (PGPKeyring Class)

Loads a keyring from two streams.

Syntax

ANSI (Cross Platform)
int LoadFromStreams(SecureBlackboxStream* sPublicKeyringStream, SecureBlackboxStream* sSecretKeyringStream);

Unicode (Windows)
INT LoadFromStreams(SecureBlackboxStream* sPublicKeyringStream, SecureBlackboxStream* sSecretKeyringStream);
int secureblackbox_pgpkeyring_loadfromstreams(void* lpObj, SecureBlackboxStream* sPublicKeyringStream, SecureBlackboxStream* sSecretKeyringStream);
int LoadFromStreams(SecureBlackboxStream* sPublicKeyringStream, SecureBlackboxStream* sSecretKeyringStream);

Remarks

Use this method to load a keyring (usually stored in two objects, public and secret) to the keyring object. If you only one keyring object/file, pass null as the second parameter.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

RemoveByID Method (PGPKeyring Class)

Removes key by its ID.

Syntax

ANSI (Cross Platform)
int RemoveByID(const char* lpszKeyID);

Unicode (Windows)
INT RemoveByID(LPCWSTR lpszKeyID);
int secureblackbox_pgpkeyring_removebyid(void* lpObj, const char* lpszKeyID);
int RemoveByID(const QString& qsKeyID);

Remarks

Call this method to remove the specified key from the keyring.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

RemovePublic Method (PGPKeyring Class)

Removes the specified public key from the keyring.

Syntax

ANSI (Cross Platform)
int RemovePublic(int iIndex);

Unicode (Windows)
INT RemovePublic(INT iIndex);
int secureblackbox_pgpkeyring_removepublic(void* lpObj, int iIndex);
int RemovePublic(int iIndex);

Remarks

Use this method to remove a public key from the keyring. Use Index to pass the index of the key to be removed.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

RemoveSecret Method (PGPKeyring Class)

Removes the specified secret key from the keyring.

Syntax

ANSI (Cross Platform)
int RemoveSecret(int iIndex);

Unicode (Windows)
INT RemoveSecret(INT iIndex);
int secureblackbox_pgpkeyring_removesecret(void* lpObj, int iIndex);
int RemoveSecret(int iIndex);

Remarks

Use this method to remove a secret key from the keyring. Use Index to pass the index of the key to be removed.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Save Method (PGPKeyring Class)

Saves the keyring to disk.

Syntax

ANSI (Cross Platform)
int Save(const char* lpszPublicKeyringFile, const char* lpszSecretKeyringFile);

Unicode (Windows)
INT Save(LPCWSTR lpszPublicKeyringFile, LPCWSTR lpszSecretKeyringFile);
int secureblackbox_pgpkeyring_save(void* lpObj, const char* lpszPublicKeyringFile, const char* lpszSecretKeyringFile);
int Save(const QString& qsPublicKeyringFile, const QString& qsSecretKeyringFile);

Remarks

Use this method to save the keyring to disk. PGP software typically uses two files to store keyrings, public and private.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

SaveToBytes Method (PGPKeyring Class)

Saves the keyring to a byte array.

Syntax

ANSI (Cross Platform)
char* SaveToBytes(int bSecret, int *lpSize = NULL);

Unicode (Windows)
LPSTR SaveToBytes(BOOL bSecret, LPINT lpSize = NULL);
char* secureblackbox_pgpkeyring_savetobytes(void* lpObj, int bSecret, int *lpSize);
QByteArray SaveToBytes(bool bSecret);

Remarks

Use this method to save the keyring to a byte array. PGP software typically uses two files to store keyrings. Use Secret parameter to specify which part of the keyring you would like to save (public or secret).

Error Handling (C++)

This method returns a Byte Array value (with length lpSize); after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

SaveToStreams Method (PGPKeyring Class)

Saves the keyring to streams.

Syntax

ANSI (Cross Platform)
int SaveToStreams(SecureBlackboxStream* sPublicKeyringStream, SecureBlackboxStream* sSecretKeyringStream);

Unicode (Windows)
INT SaveToStreams(SecureBlackboxStream* sPublicKeyringStream, SecureBlackboxStream* sSecretKeyringStream);
int secureblackbox_pgpkeyring_savetostreams(void* lpObj, SecureBlackboxStream* sPublicKeyringStream, SecureBlackboxStream* sSecretKeyringStream);
int SaveToStreams(SecureBlackboxStream* sPublicKeyringStream, SecureBlackboxStream* sSecretKeyringStream);

Remarks

Use this method to save the keyring to streams. PGP software typically uses two files to store keyrings, public and private.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Select Method (PGPKeyring Class)

Filters a selection of keys from the keyring using a template.

Syntax

ANSI (Cross Platform)
int Select(const char* lpszFilter, int bSecretOnly, int iMaxCount);

Unicode (Windows)
INT Select(LPCWSTR lpszFilter, BOOL bSecretOnly, INT iMaxCount);
int secureblackbox_pgpkeyring_select(void* lpObj, const char* lpszFilter, int bSecretOnly, int iMaxCount);
int Select(const QString& qsFilter, bool bSecretOnly, int iMaxCount);

Remarks

Use this method to get a list of keys that satisfy the Filter criteria. The filter should follow the "Name=Value" format, where Name can be one of the following: userid, fp, fingerprint, and keyid.

Set SecretOnly to True to only search for secret keys. MaxCount allows to limit the number of keys returned.

Once the method completes, the keys that match the criteria will be available in SelectedPublicKeys and SelectedSecretKeys properties.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Error Event (PGPKeyring Class)

Information about errors during PGP key management.

Syntax

ANSI (Cross Platform)
virtual int FireError(PGPKeyringErrorEventParams *e);
typedef struct {
int ErrorCode;
const char *Description; int reserved; } PGPKeyringErrorEventParams;
Unicode (Windows) virtual INT FireError(PGPKeyringErrorEventParams *e);
typedef struct {
INT ErrorCode;
LPCWSTR Description; INT reserved; } PGPKeyringErrorEventParams;
#define EID_PGPKEYRING_ERROR 1

virtual INT SECUREBLACKBOX_CALL FireError(INT &iErrorCode, LPSTR &lpszDescription);
class PGPKeyringErrorEventParams {
public:
  int ErrorCode();

  const QString &Description();

  int EventRetVal();
  void SetEventRetVal(int iRetVal);
};
// To handle, connect one or more slots to this signal. void Error(PGPKeyringErrorEventParams *e);
// Or, subclass PGPKeyring and override this emitter function. virtual int FireError(PGPKeyringErrorEventParams *e) {...}

Remarks

The event is fired in case of exceptional conditions during key management.

ErrorCode contains an error code and Description contains a textual description of the error.

Notification Event (PGPKeyring Class)

This event notifies the application about an underlying control flow event.

Syntax

ANSI (Cross Platform)
virtual int FireNotification(PGPKeyringNotificationEventParams *e);
typedef struct {
const char *EventID;
const char *EventParam; int reserved; } PGPKeyringNotificationEventParams;
Unicode (Windows) virtual INT FireNotification(PGPKeyringNotificationEventParams *e);
typedef struct {
LPCWSTR EventID;
LPCWSTR EventParam; INT reserved; } PGPKeyringNotificationEventParams;
#define EID_PGPKEYRING_NOTIFICATION 2

virtual INT SECUREBLACKBOX_CALL FireNotification(LPSTR &lpszEventID, LPSTR &lpszEventParam);
class PGPKeyringNotificationEventParams {
public:
  const QString &EventID();

  const QString &EventParam();

  int EventRetVal();
  void SetEventRetVal(int iRetVal);
};
// To handle, connect one or more slots to this signal. void Notification(PGPKeyringNotificationEventParams *e);
// Or, subclass PGPKeyring and override this emitter function. virtual int FireNotification(PGPKeyringNotificationEventParams *e) {...}

Remarks

The class fires this event to let the application know about some event, occurrence, or milestone in the component. For example, it may fire to report completion of the document processing. The list of events being reported is not fixed, and may be flexibly extended over time.

The unique identifier of the event is provided in EventID parameter. EventParam contains any parameters accompanying the occurrence. Depending on the type of the component, the exact action it is performing, or the document being processed, one or both may be omitted.

SecureBlackboxStream Type

Syntax

SecureBlackboxStream (declared in secureblackbox.h)

Remarks

The PGPKeyring class includes one or more API members that take a stream object as a parameter. To use such API members, create a concrete class that implements the SecureBlackboxStream interface and pass the PGPKeyring class an instance of that concrete class.

When implementing the SecureBlackboxStream interface's properties and methods, they must behave as described below. If the concrete class's implementation does not behave as expected, undefined behavior may occur.

Properties

CanRead Whether the stream supports reading.

bool CanRead() { return true; }
CanSeek Whether the stream supports seeking.

bool CanSeek() { return true; }
CanWrite Whether the stream supports writing.

bool CanWrite() { return true; }
Length Gets the length of the stream, in bytes.

int64 GetLength() = 0;

Methods

Close Closes the stream, releasing all resources currently allocated for it.

void Close() {}

This method is called automatically when a SecureBlackboxStream object is deleted.

Flush Forces all data held by the stream's buffers to be written out to storage.

int Flush() { return 0; }

Must return 0 if flushing is successful; or -1 if an error occurs or the stream is closed. If the stream does not support writing, this method must do nothing and return 0.

Read Reads a sequence of bytes from the stream and advances the current position within the stream by the number of bytes read.

int Read(void* buffer, int count) = 0;

Buffer specifies the buffer to populate with data from the stream. Count specifies the number of bytes that should be read from the stream.

Must return the total number of bytes read into Buffer; this may be less than Count if that many bytes are not currently available, or 0 if the end of the stream has been reached. Must return -1 if an error occurs, if reading is not supported, or if the stream is closed.

Seek Sets the current position within the stream based on a particular point of origin.

int64 Seek(int64 offset, int seekOrigin) = 0;

Offset specifies the offset in the stream to seek to, relative to SeekOrigin. Valid values for SeekOrigin are:

  • 0: Seek from beginning.
  • 1: Seek from current position.
  • 2: Seek from end.

Must return the new position within the stream; or -1 if an error occurs, if seeking is not supported, or if the stream is closed (however, see note below). If -1 is returned, the current position within the stream must remain unchanged.

Note: If the stream is not closed, it must always be possible to call this method with an Offset of 0 and a SeekOrigin of 1 to obtain the current position within the stream, even if seeking is not otherwise supported.

Write Writes a sequence of bytes to the stream and advances the current position within the stream by the number of bytes written.

int Write(const void* buffer, int count) = 0;

Buffer specifies the buffer with data to write to the stream. Count specifies the number of bytes that should be written to the stream.

Must return the total number of bytes written to the stream; this may be less than Count if that many bytes could not be written. Must return -1 if an error occurs, if writing is not supported, or if the stream is closed.

Config Settings (PGPKeyring Class)

The class accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.

PGPKeyring Config Settings

TempPath:   Location where the temporary files are stored.

This setting specifies an absolute path to the location on disk where temporary files are stored.

Base Config Settings

CheckKeyIntegrityBeforeUse:   Enables or disable private key integrity check before use.

This global property enables or disables private key material check before each signing operation. This slows down performance a bit, but prevents a selection of attacks on RSA keys where keys with unknown origins are used.

You can switch this property off to improve performance if your project only uses known, good private keys.

CookieCaching:   Specifies whether a cookie cache should be used for HTTP(S) transports.

Set this property to enable or disable cookies caching for the class.

Supported values are:

offNo caching (default)
localLocal caching
globalGlobal caching

Cookies:   Gets or sets local cookies for the class.

Use this property to get cookies from the internal cookie storage of the class and/or restore them back between application sessions.

DefDeriveKeyIterations:   Specifies the default key derivation algorithm iteration count.

This global property sets the default number of iterations for all supported key derivation algorithms. Note that you can provide the required number of iterations by using properties of the relevant key generation component; this global setting is used in scenarios where specific iteration count is not or cannot be provided.

EnableClientSideSSLFFDHE:   Enables or disables finite field DHE key exchange support in TLS clients.

This global property enables or disables support for finite field DHE key exchange methods in TLS clients. FF DHE is a slower algorithm if compared to EC DHE; enabling it may result in slower connections.

This setting only applies to sessions negotiated with TLS version 1.3.

GlobalCookies:   Gets or sets global cookies for all the HTTP transports.

Use this property to get cookies from the GLOBAL cookie storage or restore them back between application sessions. These cookies will be used by all the classes that have its CookieCaching property set to "global".

HttpUserAgent:   Specifies the user agent name to be used by all HTTP clients.

This global setting defines the User-Agent field of the HTTP request provides information about the software that initiates the request. This value will be used by all the HTTP clients including the ones used internally in other classes.

LogDestination:   Specifies the debug log destination.

Contains a comma-separated list of values that specifies where debug log should be dumped.

Supported values are:

fileFile
consoleConsole
systemlogSystem Log (supported for Android only)
debuggerDebugger (supported for VCL for Windows and .Net)

LogDetails:   Specifies the debug log details to dump.

Contains a comma-separated list of values that specifies which debug log details to dump.

Supported values are:

timeCurrent time
levelLevel
packagePackage name
moduleModule name
classClass name
methodMethod name
threadidThread Id
contenttypeContent type
contentContent
allAll details

LogFile:   Specifies the debug log filename.

Use this property to provide a path to the log file.

LogFilters:   Specifies the debug log filters.

Contains a comma-separated list of value pairs ("name:value") that describe filters.

Supported filter names are:

exclude-packageExclude a package specified in the value
exclude-moduleExclude a module specified in the value
exclude-classExclude a class specified in the value
exclude-methodExclude a method specified in the value
include-packageInclude a package specified in the value
include-moduleInclude a module specified in the value
include-classInclude a class specified in the value
include-methodInclude a method specified in the value

LogFlushMode:   Specifies the log flush mode.

Use this property to set the log flush mode. The following values are defined:

noneNo flush (caching only)
immediateImmediate flush (real-time logging)
maxcountFlush cached entries upon reaching LogMaxEventCount entries in the cache.

LogLevel:   Specifies the debug log level.

Use this property to provide the desired debug log level.

Supported values are:

noneNone (by default)
fatalSevere errors that cause premature termination.
errorOther runtime errors or unexpected conditions.
warningUse of deprecated APIs, poor use of API, 'almost' errors, other runtime situations that are undesirable or unexpected, but not necessarily "wrong".
infoInteresting runtime events (startup/shutdown).
debugDetailed information on flow of through the system.
traceMore detailed information.

LogMaxEventCount:   Specifies the maximum number of events to cache before further action is taken.

Use this property to specify the log event number threshold. This threshold may have different effects, depending on the rotation setting and/or the flush mode.

The default value of this setting is 100.

LogRotationMode:   Specifies the log rotation mode.

Use this property to set the log rotation mode. The following values are defined:

noneNo rotation
deleteolderDelete older entries from the cache upon reaching LogMaxEventCount
keepolderKeep older entries in the cache upon reaching LogMaxEventCount (newer entries are discarded)

MaxASN1BufferLength:   Specifies the maximal allowed length for ASN.1 primitive tag data.

This global property limits the maximal allowed length for ASN.1 tag data for non-content-carrying structures, such as certificates, CRLs, or timestamps. It does not affect structures that can carry content, such as CMS/CAdES messages. This is a security property aiming at preventing DoS attacks.

MaxASN1TreeDepth:   Specifies the maximal depth for processed ASN.1 trees.

This global property limits the maximal depth of ASN.1 trees that the component can handle without throwing an error. This is a security property aiming at preventing DoS attacks.

OCSPHashAlgorithm:   Specifies the hash algorithm to be used to identify certificates in OCSP requests.

This global setting defines the hash algorithm to use in OCSP requests during chain validation. Some OCSP responders can only use older algorithms, in which case setting this property to SHA1 may be helpful.

StaticDNS:   Specifies whether static DNS rules should be used.

Set this property to enable or disable static DNS rules for the class. Works only if UseOwnDNSResolver is set to true.

Supported values are:

noneNo static DNS rules (default)
localLocal static DNS rules
globalGlobal static DNS rules

StaticIPAddress[domain]:   Gets or sets an IP address for the specified domain name.

Use this property to get or set an IP address for the specified domain name in the internal (of the class) or global DNS rules storage depending on the StaticDNS value. The type of the IP address (IPv4 or IPv6) is determined automatically. If both addresses are available, they are devided by the | (pipe) character.

StaticIPAddresses:   Gets or sets all the static DNS rules.

Use this property to get static DNS rules from the current rules storage or restore them back between application sessions. If StaticDNS of the class is set to "local", the property returns/restores the rules from/to the internal storage of the class. If StaticDNS of the class is set to "global", the property returns/restores the rules from/to the GLOBAL storage. The rules list is returned and accepted in JSON format.

Tag:   Allows to store any custom data.

Use this config property to store any custom data.

TLSSessionGroup:   Specifies the group name of TLS sessions to be used for session resumption.

Use this property to limit the search of chached TLS sessions to the specified group. Sessions from other groups will be ignored. By default, all sessions are cached with an empty group name and available to all the classes.

TLSSessionLifetime:   Specifies lifetime in seconds of the cached TLS session.

Use this property to specify how much time the TLS session should be kept in the session cache. After this time, the session expires and will be automatically removed from the cache. Default value is 300 seconds (5 minutes).

TLSSessionPurgeInterval:   Specifies how often the session cache should remove the expired TLS sessions.

Use this property to specify the time interval of purging the expired TLS sessions from the session cache. Default value is 60 seconds (1 minute).

UseOwnDNSResolver:   Specifies whether the client components should use own DNS resolver.

Set this global property to false to force all the client components to use the DNS resolver provided by the target OS instead of using own one.

UseSharedSystemStorages:   Specifies whether the validation engine should use a global per-process copy of the system certificate stores.

Set this global property to false to make each validation run use its own copy of system certificate stores.

UseSystemOAEPAndPSS:   Enforces or disables the use of system-driven RSA OAEP and PSS computations.

This global setting defines who is responsible for performing RSA-OAEP and RSA-PSS computations where the private key is stored in a Windows system store and is exportable. If set to true, SBB will delegate the computations to Windows via a CryptoAPI call. Otherwise, it will export the key material and perform the computations using its own OAEP/PSS implementation.

This setting only applies to certificates originating from a Windows system store.

UseSystemRandom:   Enables or disables the use of the OS PRNG.

Use this global property to enable or disable the use of operating system-driven pseudorandom number generation.

Trappable Errors (PGPKeyring Class)

Error Handling (C++)

Call the GetLastErrorCode() method to obtain the last called method's result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. Known error codes are listed below. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

PGPKeyring Errors

1048577   Invalid parameter value (SB_ERROR_INVALID_PARAMETER)
1048578   Class is configured incorrectly (SB_ERROR_INVALID_SETUP)
1048579   Operation cannot be executed in the current state (SB_ERROR_INVALID_STATE)
1048580   Attempt to set an invalid value to a property (SB_ERROR_INVALID_VALUE)
1048581   Certificate does not have its private key loaded (SB_ERROR_NO_PRIVATE_KEY)
1048581   Cancelled by the user (SB_ERROR_CANCELLED_BY_USER) 
27262977   File does not exist (SB_ERROR_PGP_FILE_NOT_EXISTS)
27262978   Invalid key (SB_ERROR_PGP_INVALID_KEY)
27262979   No public key (SB_ERROR_PGP_NO_PUBLIC_KEY)
27262980   No secret key (SB_ERROR_PGP_NO_SECRET_KEY)
27262981   Not found (SB_ERROR_PGP_NOT_FOUND)
27262982   Operation cannot be performed on a subkey (SB_ERROR_PGP_OPERATION_ON_SUBKEY)