Crypto Class
Properties Methods Events Config Settings Errors
The iaKeystore class offers key storage functionality for a variety of key store types.
Syntax
Crypto
Remarks
TBD
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
BlockSize | The block size of the chosen symmetric cipher. |
CanEncrypt | Returns true if the crypto object can be used for encryption. |
CanSign | Returns true if the crypto object is capable of data signing. |
ChannelAuthID | An authentication identifier (e. |
ChannelAuthPars | Authentication parameters, if assumed by the authentication scheme used. |
ChannelAuthToken | An authentication secret (e. |
ChannelAuthType | The authentication type used (e. |
ChannelNetworkConfig | Use this property to provide the network configuration settings. |
ChannelProtectionConfig | Use this property to provide the protection configuration settings. |
ChannelProtocol | The connection protocol. |
ChannelSigID | A signature identifier (e. |
ChannelSigPars | Signature parameters, if assumed by the authentication scheme used. |
ChannelSigToken | A signature secret (e. |
ChannelSigType | The signature type to use (e. |
ChannelValidateServiceCreds | Specifies whether server-side credentials, such as TLS certificates, should be validated automatically using internal validation rules. |
CryptoKeyBits | The length of the key in bits. |
CryptoKeyCanDecrypt | Returns True if the key can be used for decryption. |
CryptoKeyCanDerive | Returns True if the key can be used for key derivation. |
CryptoKeyCanEncrypt | Returns True if the key can be used for encryption. |
CryptoKeyCanHash | Returns True if the key can be used for hashing/MACing. |
CryptoKeyCanSign | Returns True if the key can be used for signing. |
CryptoKeyCanSignRecover | Returns True if the key can be used for enveloping signing. |
CryptoKeyCanUnwrap | Returns True if the key can be used for key unwrapping. |
CryptoKeyCanVerify | Returns True if the key can be used for verifying signatures. |
CryptoKeyCanVerifyRecover | Returns True if the key can be used for verifying enveloping signatures. |
CryptoKeyCanWrap | Returns True if the key can be used for key wrapping. |
CryptoKeyCapabilities | A collection of information about the key capabilities TBD: discuss type and options. |
CryptoKeyDescription | The description, or label, of the object. |
CryptoKeyEnabled | Enables or disables this key for use in encryption or signing operation. |
CryptoKeyExportable | Returns True if the key is exportable (can be serialized into an array of bytes), and False otherwise. |
CryptoKeyFingerprint | Contains the fingerprint (a hash imprint) of this key. |
CryptoKeyFriendlyName | Contains an associated alias (friendly name) of the key. |
CryptoKeyGroup | The name of the group associated with this object. |
CryptoKeyID | Provides access to a storage-specific key identifier. |
CryptoKeyIV | The initialization vector (IV) of a symmetric key. |
CryptoKeyKeyType | The type of the key contained in the object. |
CryptoKeyMechanism | The algorithm of the cryptographic key. |
CryptoKeyMechanismParams | The parameters of the key algorithm, such as Curve for ECDSA keys or domain parameters for DH keys. |
CryptoKeyNonce | A nonce value associated with a key. |
CryptoKeyNonPublic | Returns True if the object is private, and False otherwise. |
CryptoKeyOrigin | Returns the origin (the Storage ID) of this key. |
CryptoKeyPersistent | Returns True if the object is persistent in the store. |
CryptoKeyProperties | Returns a collection of object properties as a comma separated name=value list. |
CryptoKeyReadOnly | Returns True if the object is readonly. |
CryptoKeySensitive | Returns True if the object is sensitive, and False otherwise. |
CryptoKeySize | The size of the object in bytes. |
CryptoKeySubject | Returns the key subject. |
CryptoKeyUserId | TBD. |
CryptoKeyUserKeySecret | TBD. |
CryptoKeyValid | Returns True if this key is valid. |
CryptoKeyValidFrom | The time point at which the key becomes valid, in UTC. |
CryptoKeyValidTo | The time point at which the key expires, in UTC. |
CryptoKeyValue | The byte array representation of the key. |
InputEncoding | The encoding to apply to the input data. |
InputIsHash | Indicates whether the input data contains the hash or the actual data. |
KeySize | Returns the cryptographic key size in bytes. |
Mechanism | The security mechanism to be used during the crypto operation. |
Nonce | Specifies the Nonce value to employ. |
OutputEncoding | The encoding type to apply to the output data. |
Padding | The padding type to apply to the encrypted data. |
ParCount | The number of records in the Par arrays. |
ParName | The name element in a (name, value) pair. |
ParValue | The value element in a (name, value) pair. |
SessionClientAuthenticated | Specifies whether client authentication was performed during this connection. |
SessionClientAuthRequested | Specifies whether client authentication was requested during this connection. |
SessionClientCredential | Contains the client credential that was used for authentication (e. |
SessionConnectionEstablished | Indicates whether the connection has been established fully. |
SessionConnectionLog | Contains the connection log. |
SessionOperationMessage | Contains the status string of the last operation. |
SessionOperationStatus | Contains the status code of the last operation. |
SessionProtection | The protection parameters employed by this connection. |
SessionSecureConnection | Indicates whether TLS or SSL is enabled for this connection. |
SessionServiceAuthenticated | Indicates whether service authentication was performed during a TLS-enabled or otherwise protected connection. |
SessionServiceCredential | Contains the service credential that was used for authentication (e. |
SessionSessionID | The unique identifier assigned to this session. |
SessionTotalBytesReceived | The total number of bytes received over this connection. |
SessionTotalBytesSent | The total number of bytes sent over this connection. |
SignatureValidationResult | The signature validation result. |
StreamCipher | Returns true if the selected algorithms works as a stream cipher. |
SymmetricMode | Specifies the symmetric cipher mode of operation. |
UserId | TBD. |
UserKeySecret | TBD. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting. |
Decrypt | Decrypts a buffer. |
DecryptFile | Decrypts a file. |
DecryptFinal | Finalization of decryption by blocks. |
DecryptInit | Initializes a per-block decryption process. |
DecryptUpdate | Decrypts the next block of encrypted data. |
Encrypt | Encrypts a buffer. |
EncryptFile | Encrypts a file. |
EncryptFinal | Finalization of encryption by blocks. |
EncryptInit | Initializes a per-block encryption process. |
EncryptUpdate | Encrypts the next block of data. |
Hash | Calculates a message digest over a byte array. |
HashFile | Calculates a message digest over data contained in a file. |
HashFinal | Completes the hash and returns the resulting message digest. |
HashInit | Resets the hash function context. |
HashUpdate | Feeds a chunk of data to the hash function. |
PerformAction | Performs a custom action and returns its result. |
RandomGenerate | Generates an array of random bytes. |
RandomSeed | Seeds the generator with a data in a byte array. |
Sign | Signs a buffer. |
SignFile | Signs a file. |
SignFinal | Finalizes the multi-step signing operation. |
SignInit | Initializes a per-block signing process. |
SignUpdate | Sends the next block of data for signing. |
Verify | Verifies an enveloped or enveloping signature contained in a buffer. |
VerifyDetached | Verifies a detached signature. |
VerifyDetachedFile | Verifies a detached signature. |
VerifyDetachedFinal | Finalizes the multi-step detached verification operation. |
VerifyDetachedInit | Initiates multi-step verification of a detached signature. |
VerifyDetachedUpdate | Sends a data block for detached signature verification. |
VerifyFile | Verifies an enveloped or enveloping signature contained in a file. |
VerifyFinal | Finalizes the multi-step verification operation. |
VerifyInit | Initializes a per-block verification process. |
VerifyUpdate | Sends the next block of data for verification. |
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.
AttestationRecord | Passes an attestation record to the user code. |
ClientAuth | Notifies the application that the service requested an authentication credential from the client. |
ClientAuthFailed | Notifies the application about the failure of attempted authentication type. |
Error | Information about errors during data delivery. |
Notification | This event notifies the application about an underlying control flow event. |
OperationFinish | Reports the completion of data processing operation. |
OperationStart | Reports the start of data processing operation. |
Progress | Reports the data encryption/decryption progress. |
ServiceAuth | Notifies about the start of service authentication. |
ServiceAuthFailed | Notifies about the failure of service authentication attempt. |
Config Settings
The following is a list of config settings for the class with short descriptions. Click on the links for further details.
TempPath | Path for storing temporary files. |
BlockSize Property (Crypto Class)
The block size of the chosen symmetric cipher.
Syntax
ANSI (Cross Platform) int GetBlockSize(); Unicode (Windows) INT GetBlockSize();
int pkiproxy_crypto_getblocksize(void* lpObj);
int GetBlockSize();
Default Value
0
Remarks
This property returns the block size of the chosen symmetric cipher.
Modern symmetric algorithms typically use blocks of 16 bytes. Some older algorithms, such as DES or Blowfish, use 8-byte blocks.
This property is read-only.
Data Type
Integer
CanEncrypt Property (Crypto Class)
Returns true if the crypto object can be used for encryption.
Syntax
ANSI (Cross Platform) int GetCanEncrypt(); Unicode (Windows) BOOL GetCanEncrypt();
int pkiproxy_crypto_getcanencrypt(void* lpObj);
bool GetCanEncrypt();
Default Value
FALSE
Remarks
This property returns true if the crypto object can be used for encryption and decryption. This capability depends on the cryptographic algorithm.
This property is read-only and not available at design time.
Data Type
Boolean
CanSign Property (Crypto Class)
Returns true if the crypto object is capable of data signing.
Syntax
ANSI (Cross Platform) int GetCanSign(); Unicode (Windows) BOOL GetCanSign();
int pkiproxy_crypto_getcansign(void* lpObj);
bool GetCanSign();
Default Value
FALSE
Remarks
This property returns true if the crypto object can be used for signing data and validating signatures. This capability depends on the cryptographic algorithm.
This property is read-only and not available at design time.
Data Type
Boolean
ChannelAuthID Property (Crypto Class)
An authentication identifier (e.
Syntax
ANSI (Cross Platform) char* GetChannelAuthID();
int SetChannelAuthID(const char* lpszChannelAuthID); Unicode (Windows) LPWSTR GetChannelAuthID();
INT SetChannelAuthID(LPCWSTR lpszChannelAuthID);
char* pkiproxy_crypto_getchannelauthid(void* lpObj);
int pkiproxy_crypto_setchannelauthid(void* lpObj, const char* lpszChannelAuthID);
QString GetChannelAuthID();
int SetChannelAuthID(QString qsChannelAuthID);
Default Value
""
Remarks
An authentication identifier (e.g. a username).
Data Type
String
ChannelAuthPars Property (Crypto Class)
Authentication parameters, if assumed by the authentication scheme used.
Syntax
ANSI (Cross Platform) char* GetChannelAuthPars();
int SetChannelAuthPars(const char* lpszChannelAuthPars); Unicode (Windows) LPWSTR GetChannelAuthPars();
INT SetChannelAuthPars(LPCWSTR lpszChannelAuthPars);
char* pkiproxy_crypto_getchannelauthpars(void* lpObj);
int pkiproxy_crypto_setchannelauthpars(void* lpObj, const char* lpszChannelAuthPars);
QString GetChannelAuthPars();
int SetChannelAuthPars(QString qsChannelAuthPars);
Default Value
""
Remarks
Authentication parameters, if assumed by the authentication scheme used.
Data Type
String
ChannelAuthToken Property (Crypto Class)
An authentication secret (e.
Syntax
ANSI (Cross Platform) char* GetChannelAuthToken();
int SetChannelAuthToken(const char* lpszChannelAuthToken); Unicode (Windows) LPWSTR GetChannelAuthToken();
INT SetChannelAuthToken(LPCWSTR lpszChannelAuthToken);
char* pkiproxy_crypto_getchannelauthtoken(void* lpObj);
int pkiproxy_crypto_setchannelauthtoken(void* lpObj, const char* lpszChannelAuthToken);
QString GetChannelAuthToken();
int SetChannelAuthToken(QString qsChannelAuthToken);
Default Value
""
Remarks
An authentication secret (e.g. a password or token).
Data Type
String
ChannelAuthType Property (Crypto Class)
The authentication type used (e.
Syntax
ANSI (Cross Platform) char* GetChannelAuthType();
int SetChannelAuthType(const char* lpszChannelAuthType); Unicode (Windows) LPWSTR GetChannelAuthType();
INT SetChannelAuthType(LPCWSTR lpszChannelAuthType);
char* pkiproxy_crypto_getchannelauthtype(void* lpObj);
int pkiproxy_crypto_setchannelauthtype(void* lpObj, const char* lpszChannelAuthType);
QString GetChannelAuthType();
int SetChannelAuthType(QString qsChannelAuthType);
Default Value
""
Remarks
The authentication type used (e.g. token or cert).
Data Type
String
ChannelNetworkConfig Property (Crypto Class)
Use this property to provide the network configuration settings.
Syntax
ANSI (Cross Platform) char* GetChannelNetworkConfig();
int SetChannelNetworkConfig(const char* lpszChannelNetworkConfig); Unicode (Windows) LPWSTR GetChannelNetworkConfig();
INT SetChannelNetworkConfig(LPCWSTR lpszChannelNetworkConfig);
char* pkiproxy_crypto_getchannelnetworkconfig(void* lpObj);
int pkiproxy_crypto_setchannelnetworkconfig(void* lpObj, const char* lpszChannelNetworkConfig);
QString GetChannelNetworkConfig();
int SetChannelNetworkConfig(QString qsChannelNetworkConfig);
Default Value
""
Remarks
Use this property to provide the network configuration settings. The exact format and settings supported to be defined later.
Data Type
String
ChannelProtectionConfig Property (Crypto Class)
Use this property to provide the protection configuration settings.
Syntax
ANSI (Cross Platform) char* GetChannelProtectionConfig();
int SetChannelProtectionConfig(const char* lpszChannelProtectionConfig); Unicode (Windows) LPWSTR GetChannelProtectionConfig();
INT SetChannelProtectionConfig(LPCWSTR lpszChannelProtectionConfig);
char* pkiproxy_crypto_getchannelprotectionconfig(void* lpObj);
int pkiproxy_crypto_setchannelprotectionconfig(void* lpObj, const char* lpszChannelProtectionConfig);
QString GetChannelProtectionConfig();
int SetChannelProtectionConfig(QString qsChannelProtectionConfig);
Default Value
""
Remarks
Use this property to provide the protection configuration settings. The exact format to use depends on the underlying security protocol used. In case of TLS this property expects a list of comma-separated ciphersuites, in order of priority.
Data Type
String
ChannelProtocol Property (Crypto Class)
The connection protocol.
Syntax
ANSI (Cross Platform) char* GetChannelProtocol();
int SetChannelProtocol(const char* lpszChannelProtocol); Unicode (Windows) LPWSTR GetChannelProtocol();
INT SetChannelProtocol(LPCWSTR lpszChannelProtocol);
char* pkiproxy_crypto_getchannelprotocol(void* lpObj);
int pkiproxy_crypto_setchannelprotocol(void* lpObj, const char* lpszChannelProtocol);
QString GetChannelProtocol();
int SetChannelProtocol(QString qsChannelProtocol);
Default Value
""
Remarks
The connection protocol. Leave empty to use the default protocol supported by the storage type.
Data Type
String
ChannelSigID Property (Crypto Class)
A signature identifier (e.
Syntax
ANSI (Cross Platform) char* GetChannelSigID();
int SetChannelSigID(const char* lpszChannelSigID); Unicode (Windows) LPWSTR GetChannelSigID();
INT SetChannelSigID(LPCWSTR lpszChannelSigID);
char* pkiproxy_crypto_getchannelsigid(void* lpObj);
int pkiproxy_crypto_setchannelsigid(void* lpObj, const char* lpszChannelSigID);
QString GetChannelSigID();
int SetChannelSigID(QString qsChannelSigID);
Default Value
""
Remarks
A signature identifier (e.g. a username).
Data Type
String
ChannelSigPars Property (Crypto Class)
Signature parameters, if assumed by the authentication scheme used.
Syntax
ANSI (Cross Platform) char* GetChannelSigPars();
int SetChannelSigPars(const char* lpszChannelSigPars); Unicode (Windows) LPWSTR GetChannelSigPars();
INT SetChannelSigPars(LPCWSTR lpszChannelSigPars);
char* pkiproxy_crypto_getchannelsigpars(void* lpObj);
int pkiproxy_crypto_setchannelsigpars(void* lpObj, const char* lpszChannelSigPars);
QString GetChannelSigPars();
int SetChannelSigPars(QString qsChannelSigPars);
Default Value
""
Remarks
Signature parameters, if assumed by the authentication scheme used.
Data Type
String
ChannelSigToken Property (Crypto Class)
A signature secret (e.
Syntax
ANSI (Cross Platform) char* GetChannelSigToken();
int SetChannelSigToken(const char* lpszChannelSigToken); Unicode (Windows) LPWSTR GetChannelSigToken();
INT SetChannelSigToken(LPCWSTR lpszChannelSigToken);
char* pkiproxy_crypto_getchannelsigtoken(void* lpObj);
int pkiproxy_crypto_setchannelsigtoken(void* lpObj, const char* lpszChannelSigToken);
QString GetChannelSigToken();
int SetChannelSigToken(QString qsChannelSigToken);
Default Value
""
Remarks
A signature secret (e.g. a password or token). Signature credentials are used to sign individual requests. They may be different to authentication credentials, which are used to authorize and/or authenticate to the keystore service.
Data Type
String
ChannelSigType Property (Crypto Class)
The signature type to use (e.
Syntax
ANSI (Cross Platform) char* GetChannelSigType();
int SetChannelSigType(const char* lpszChannelSigType); Unicode (Windows) LPWSTR GetChannelSigType();
INT SetChannelSigType(LPCWSTR lpszChannelSigType);
char* pkiproxy_crypto_getchannelsigtype(void* lpObj);
int pkiproxy_crypto_setchannelsigtype(void* lpObj, const char* lpszChannelSigType);
QString GetChannelSigType();
int SetChannelSigType(QString qsChannelSigType);
Default Value
""
Remarks
The signature type to use (e.g. token or cert).
Data Type
String
ChannelValidateServiceCreds Property (Crypto Class)
Specifies whether server-side credentials, such as TLS certificates, should be validated automatically using internal validation rules.
Syntax
ANSI (Cross Platform) int GetChannelValidateServiceCreds();
int SetChannelValidateServiceCreds(int bChannelValidateServiceCreds); Unicode (Windows) BOOL GetChannelValidateServiceCreds();
INT SetChannelValidateServiceCreds(BOOL bChannelValidateServiceCreds);
int pkiproxy_crypto_getchannelvalidateservicecreds(void* lpObj);
int pkiproxy_crypto_setchannelvalidateservicecreds(void* lpObj, int bChannelValidateServiceCreds);
bool GetChannelValidateServiceCreds();
int SetChannelValidateServiceCreds(bool bChannelValidateServiceCreds);
Default Value
TRUE
Remarks
Specifies whether server-side credentials, such as TLS certificates, should be validated automatically using internal validation rules.
Data Type
Boolean
CryptoKeyBits Property (Crypto Class)
The length of the key in bits.
Syntax
ANSI (Cross Platform) int GetCryptoKeyBits();
int SetCryptoKeyBits(int iCryptoKeyBits); Unicode (Windows) INT GetCryptoKeyBits();
INT SetCryptoKeyBits(INT iCryptoKeyBits);
int pkiproxy_crypto_getcryptokeybits(void* lpObj);
int pkiproxy_crypto_setcryptokeybits(void* lpObj, int iCryptoKeyBits);
int GetCryptoKeyBits();
int SetCryptoKeyBits(int iCryptoKeyBits);
Default Value
0
Remarks
The length of the key in bits.
This property is not available at design time.
Data Type
Integer
CryptoKeyCanDecrypt Property (Crypto Class)
Returns True if the key can be used for decryption.
Syntax
ANSI (Cross Platform) int GetCryptoKeyCanDecrypt();
int SetCryptoKeyCanDecrypt(int bCryptoKeyCanDecrypt); Unicode (Windows) BOOL GetCryptoKeyCanDecrypt();
INT SetCryptoKeyCanDecrypt(BOOL bCryptoKeyCanDecrypt);
int pkiproxy_crypto_getcryptokeycandecrypt(void* lpObj);
int pkiproxy_crypto_setcryptokeycandecrypt(void* lpObj, int bCryptoKeyCanDecrypt);
bool GetCryptoKeyCanDecrypt();
int SetCryptoKeyCanDecrypt(bool bCryptoKeyCanDecrypt);
Default Value
FALSE
Remarks
Returns True if the key can be used for decryption.
This property is not available at design time.
Data Type
Boolean
CryptoKeyCanDerive Property (Crypto Class)
Returns True if the key can be used for key derivation.
Syntax
ANSI (Cross Platform) int GetCryptoKeyCanDerive();
int SetCryptoKeyCanDerive(int bCryptoKeyCanDerive); Unicode (Windows) BOOL GetCryptoKeyCanDerive();
INT SetCryptoKeyCanDerive(BOOL bCryptoKeyCanDerive);
int pkiproxy_crypto_getcryptokeycanderive(void* lpObj);
int pkiproxy_crypto_setcryptokeycanderive(void* lpObj, int bCryptoKeyCanDerive);
bool GetCryptoKeyCanDerive();
int SetCryptoKeyCanDerive(bool bCryptoKeyCanDerive);
Default Value
FALSE
Remarks
Returns True if the key can be used for key derivation.
This property is not available at design time.
Data Type
Boolean
CryptoKeyCanEncrypt Property (Crypto Class)
Returns True if the key can be used for encryption.
Syntax
ANSI (Cross Platform) int GetCryptoKeyCanEncrypt();
int SetCryptoKeyCanEncrypt(int bCryptoKeyCanEncrypt); Unicode (Windows) BOOL GetCryptoKeyCanEncrypt();
INT SetCryptoKeyCanEncrypt(BOOL bCryptoKeyCanEncrypt);
int pkiproxy_crypto_getcryptokeycanencrypt(void* lpObj);
int pkiproxy_crypto_setcryptokeycanencrypt(void* lpObj, int bCryptoKeyCanEncrypt);
bool GetCryptoKeyCanEncrypt();
int SetCryptoKeyCanEncrypt(bool bCryptoKeyCanEncrypt);
Default Value
FALSE
Remarks
Returns True if the key can be used for encryption.
This property is not available at design time.
Data Type
Boolean
CryptoKeyCanHash Property (Crypto Class)
Returns True if the key can be used for hashing/MACing.
Syntax
ANSI (Cross Platform) int GetCryptoKeyCanHash();
int SetCryptoKeyCanHash(int bCryptoKeyCanHash); Unicode (Windows) BOOL GetCryptoKeyCanHash();
INT SetCryptoKeyCanHash(BOOL bCryptoKeyCanHash);
int pkiproxy_crypto_getcryptokeycanhash(void* lpObj);
int pkiproxy_crypto_setcryptokeycanhash(void* lpObj, int bCryptoKeyCanHash);
bool GetCryptoKeyCanHash();
int SetCryptoKeyCanHash(bool bCryptoKeyCanHash);
Default Value
FALSE
Remarks
Returns True if the key can be used for hashing/MACing.
This property is not available at design time.
Data Type
Boolean
CryptoKeyCanSign Property (Crypto Class)
Returns True if the key can be used for signing.
Syntax
ANSI (Cross Platform) int GetCryptoKeyCanSign();
int SetCryptoKeyCanSign(int bCryptoKeyCanSign); Unicode (Windows) BOOL GetCryptoKeyCanSign();
INT SetCryptoKeyCanSign(BOOL bCryptoKeyCanSign);
int pkiproxy_crypto_getcryptokeycansign(void* lpObj);
int pkiproxy_crypto_setcryptokeycansign(void* lpObj, int bCryptoKeyCanSign);
bool GetCryptoKeyCanSign();
int SetCryptoKeyCanSign(bool bCryptoKeyCanSign);
Default Value
FALSE
Remarks
Returns True if the key can be used for signing.
This property is not available at design time.
Data Type
Boolean
CryptoKeyCanSignRecover Property (Crypto Class)
Returns True if the key can be used for enveloping signing.
Syntax
ANSI (Cross Platform) int GetCryptoKeyCanSignRecover();
int SetCryptoKeyCanSignRecover(int bCryptoKeyCanSignRecover); Unicode (Windows) BOOL GetCryptoKeyCanSignRecover();
INT SetCryptoKeyCanSignRecover(BOOL bCryptoKeyCanSignRecover);
int pkiproxy_crypto_getcryptokeycansignrecover(void* lpObj);
int pkiproxy_crypto_setcryptokeycansignrecover(void* lpObj, int bCryptoKeyCanSignRecover);
bool GetCryptoKeyCanSignRecover();
int SetCryptoKeyCanSignRecover(bool bCryptoKeyCanSignRecover);
Default Value
FALSE
Remarks
Returns True if the key can be used for enveloping signing.
This property is not available at design time.
Data Type
Boolean
CryptoKeyCanUnwrap Property (Crypto Class)
Returns True if the key can be used for key unwrapping.
Syntax
ANSI (Cross Platform) int GetCryptoKeyCanUnwrap();
int SetCryptoKeyCanUnwrap(int bCryptoKeyCanUnwrap); Unicode (Windows) BOOL GetCryptoKeyCanUnwrap();
INT SetCryptoKeyCanUnwrap(BOOL bCryptoKeyCanUnwrap);
int pkiproxy_crypto_getcryptokeycanunwrap(void* lpObj);
int pkiproxy_crypto_setcryptokeycanunwrap(void* lpObj, int bCryptoKeyCanUnwrap);
bool GetCryptoKeyCanUnwrap();
int SetCryptoKeyCanUnwrap(bool bCryptoKeyCanUnwrap);
Default Value
FALSE
Remarks
Returns True if the key can be used for key unwrapping.
This property is not available at design time.
Data Type
Boolean
CryptoKeyCanVerify Property (Crypto Class)
Returns True if the key can be used for verifying signatures.
Syntax
ANSI (Cross Platform) int GetCryptoKeyCanVerify();
int SetCryptoKeyCanVerify(int bCryptoKeyCanVerify); Unicode (Windows) BOOL GetCryptoKeyCanVerify();
INT SetCryptoKeyCanVerify(BOOL bCryptoKeyCanVerify);
int pkiproxy_crypto_getcryptokeycanverify(void* lpObj);
int pkiproxy_crypto_setcryptokeycanverify(void* lpObj, int bCryptoKeyCanVerify);
bool GetCryptoKeyCanVerify();
int SetCryptoKeyCanVerify(bool bCryptoKeyCanVerify);
Default Value
FALSE
Remarks
Returns True if the key can be used for verifying signatures.
This property is not available at design time.
Data Type
Boolean
CryptoKeyCanVerifyRecover Property (Crypto Class)
Returns True if the key can be used for verifying enveloping signatures.
Syntax
ANSI (Cross Platform) int GetCryptoKeyCanVerifyRecover();
int SetCryptoKeyCanVerifyRecover(int bCryptoKeyCanVerifyRecover); Unicode (Windows) BOOL GetCryptoKeyCanVerifyRecover();
INT SetCryptoKeyCanVerifyRecover(BOOL bCryptoKeyCanVerifyRecover);
int pkiproxy_crypto_getcryptokeycanverifyrecover(void* lpObj);
int pkiproxy_crypto_setcryptokeycanverifyrecover(void* lpObj, int bCryptoKeyCanVerifyRecover);
bool GetCryptoKeyCanVerifyRecover();
int SetCryptoKeyCanVerifyRecover(bool bCryptoKeyCanVerifyRecover);
Default Value
FALSE
Remarks
Returns True if the key can be used for verifying enveloping signatures.
This property is not available at design time.
Data Type
Boolean
CryptoKeyCanWrap Property (Crypto Class)
Returns True if the key can be used for key wrapping.
Syntax
ANSI (Cross Platform) int GetCryptoKeyCanWrap();
int SetCryptoKeyCanWrap(int bCryptoKeyCanWrap); Unicode (Windows) BOOL GetCryptoKeyCanWrap();
INT SetCryptoKeyCanWrap(BOOL bCryptoKeyCanWrap);
int pkiproxy_crypto_getcryptokeycanwrap(void* lpObj);
int pkiproxy_crypto_setcryptokeycanwrap(void* lpObj, int bCryptoKeyCanWrap);
bool GetCryptoKeyCanWrap();
int SetCryptoKeyCanWrap(bool bCryptoKeyCanWrap);
Default Value
FALSE
Remarks
Returns True if the key can be used for key wrapping.
This property is not available at design time.
Data Type
Boolean
CryptoKeyCapabilities Property (Crypto Class)
A collection of information about the key capabilities TBD: discuss type and options.
Syntax
ANSI (Cross Platform) char* GetCryptoKeyCapabilities();
int SetCryptoKeyCapabilities(const char* lpszCryptoKeyCapabilities); Unicode (Windows) LPWSTR GetCryptoKeyCapabilities();
INT SetCryptoKeyCapabilities(LPCWSTR lpszCryptoKeyCapabilities);
char* pkiproxy_crypto_getcryptokeycapabilities(void* lpObj);
int pkiproxy_crypto_setcryptokeycapabilities(void* lpObj, const char* lpszCryptoKeyCapabilities);
QString GetCryptoKeyCapabilities();
int SetCryptoKeyCapabilities(QString qsCryptoKeyCapabilities);
Default Value
""
Remarks
A collection of information about the key capabilities TBD: discuss type and options. The following capabilities are offered by PKCS#11: "local", "trusted", "sensitive", "always sensitive", "never extractable", "always authenticate", "modifiable", plus we need to support custom parameters (e.g. Key Checksum)
This property is not available at design time.
Data Type
String
CryptoKeyDescription Property (Crypto Class)
The description, or label, of the object.
Syntax
ANSI (Cross Platform) char* GetCryptoKeyDescription();
int SetCryptoKeyDescription(const char* lpszCryptoKeyDescription); Unicode (Windows) LPWSTR GetCryptoKeyDescription();
INT SetCryptoKeyDescription(LPCWSTR lpszCryptoKeyDescription);
char* pkiproxy_crypto_getcryptokeydescription(void* lpObj);
int pkiproxy_crypto_setcryptokeydescription(void* lpObj, const char* lpszCryptoKeyDescription);
QString GetCryptoKeyDescription();
int SetCryptoKeyDescription(QString qsCryptoKeyDescription);
Default Value
""
Remarks
The description, or label, of the object.
This property is not available at design time.
Data Type
String
CryptoKeyEnabled Property (Crypto Class)
Enables or disables this key for use in encryption or signing operation.
Syntax
ANSI (Cross Platform) int GetCryptoKeyEnabled();
int SetCryptoKeyEnabled(int bCryptoKeyEnabled); Unicode (Windows) BOOL GetCryptoKeyEnabled();
INT SetCryptoKeyEnabled(BOOL bCryptoKeyEnabled);
int pkiproxy_crypto_getcryptokeyenabled(void* lpObj);
int pkiproxy_crypto_setcryptokeyenabled(void* lpObj, int bCryptoKeyEnabled);
bool GetCryptoKeyEnabled();
int SetCryptoKeyEnabled(bool bCryptoKeyEnabled);
Default Value
FALSE
Remarks
Enables or disables this key for use in encryption or signing operation.
This property is not available at design time.
Data Type
Boolean
CryptoKeyExportable Property (Crypto Class)
Returns True if the key is exportable (can be serialized into an array of bytes), and False otherwise.
Syntax
ANSI (Cross Platform) int GetCryptoKeyExportable();
int SetCryptoKeyExportable(int bCryptoKeyExportable); Unicode (Windows) BOOL GetCryptoKeyExportable();
INT SetCryptoKeyExportable(BOOL bCryptoKeyExportable);
int pkiproxy_crypto_getcryptokeyexportable(void* lpObj);
int pkiproxy_crypto_setcryptokeyexportable(void* lpObj, int bCryptoKeyExportable);
bool GetCryptoKeyExportable();
int SetCryptoKeyExportable(bool bCryptoKeyExportable);
Default Value
FALSE
Remarks
Returns True if the key is exportable (can be serialized into an array of bytes), and False otherwise.
This property is not available at design time.
Data Type
Boolean
CryptoKeyFingerprint Property (Crypto Class)
Contains the fingerprint (a hash imprint) of this key.
Syntax
ANSI (Cross Platform) int GetCryptoKeyFingerprint(char* &lpCryptoKeyFingerprint, int &lenCryptoKeyFingerprint);
int SetCryptoKeyFingerprint(const char* lpCryptoKeyFingerprint, int lenCryptoKeyFingerprint); Unicode (Windows) INT GetCryptoKeyFingerprint(LPSTR &lpCryptoKeyFingerprint, INT &lenCryptoKeyFingerprint);
INT SetCryptoKeyFingerprint(LPCSTR lpCryptoKeyFingerprint, INT lenCryptoKeyFingerprint);
int pkiproxy_crypto_getcryptokeyfingerprint(void* lpObj, char** lpCryptoKeyFingerprint, int* lenCryptoKeyFingerprint);
int pkiproxy_crypto_setcryptokeyfingerprint(void* lpObj, const char* lpCryptoKeyFingerprint, int lenCryptoKeyFingerprint);
QByteArray GetCryptoKeyFingerprint();
int SetCryptoKeyFingerprint(QByteArray qbaCryptoKeyFingerprint);
Remarks
Contains the fingerprint (a hash imprint) of this key.
This property is not available at design time.
Data Type
Byte Array
CryptoKeyFriendlyName Property (Crypto Class)
Contains an associated alias (friendly name) of the key.
Syntax
ANSI (Cross Platform) char* GetCryptoKeyFriendlyName();
int SetCryptoKeyFriendlyName(const char* lpszCryptoKeyFriendlyName); Unicode (Windows) LPWSTR GetCryptoKeyFriendlyName();
INT SetCryptoKeyFriendlyName(LPCWSTR lpszCryptoKeyFriendlyName);
char* pkiproxy_crypto_getcryptokeyfriendlyname(void* lpObj);
int pkiproxy_crypto_setcryptokeyfriendlyname(void* lpObj, const char* lpszCryptoKeyFriendlyName);
QString GetCryptoKeyFriendlyName();
int SetCryptoKeyFriendlyName(QString qsCryptoKeyFriendlyName);
Default Value
""
Remarks
Contains an associated alias (friendly name) of the key. PKCS#11 equivalent: Label.
This property is not available at design time.
Data Type
String
CryptoKeyGroup Property (Crypto Class)
The name of the group associated with this object.
Syntax
ANSI (Cross Platform) char* GetCryptoKeyGroup();
int SetCryptoKeyGroup(const char* lpszCryptoKeyGroup); Unicode (Windows) LPWSTR GetCryptoKeyGroup();
INT SetCryptoKeyGroup(LPCWSTR lpszCryptoKeyGroup);
char* pkiproxy_crypto_getcryptokeygroup(void* lpObj);
int pkiproxy_crypto_setcryptokeygroup(void* lpObj, const char* lpszCryptoKeyGroup);
QString GetCryptoKeyGroup();
int SetCryptoKeyGroup(QString qsCryptoKeyGroup);
Default Value
""
Remarks
The name of the group associated with this object. Groups allow to bind together multiple objects logically connected with each other, such as certificates and their keys.
This property is not available at design time.
Data Type
String
CryptoKeyID Property (Crypto Class)
Provides access to a storage-specific key identifier.
Syntax
ANSI (Cross Platform) char* GetCryptoKeyID();
int SetCryptoKeyID(const char* lpszCryptoKeyID); Unicode (Windows) LPWSTR GetCryptoKeyID();
INT SetCryptoKeyID(LPCWSTR lpszCryptoKeyID);
char* pkiproxy_crypto_getcryptokeyid(void* lpObj);
int pkiproxy_crypto_setcryptokeyid(void* lpObj, const char* lpszCryptoKeyID);
QString GetCryptoKeyID();
int SetCryptoKeyID(QString qsCryptoKeyID);
Default Value
""
Remarks
Provides access to a storage-specific key identifier. Key identifiers are used by cryptographicproviders to refer to a particular key and/or distinguish between different keys. They aretypically unique within a storage, but there is no guarantee that a particular cryptoproviderwill conform to that (or will assign any key IDs at all).
This property is not available at design time.
Data Type
String
CryptoKeyIV Property (Crypto Class)
The initialization vector (IV) of a symmetric key.
Syntax
ANSI (Cross Platform) int GetCryptoKeyIV(char* &lpCryptoKeyIV, int &lenCryptoKeyIV);
int SetCryptoKeyIV(const char* lpCryptoKeyIV, int lenCryptoKeyIV); Unicode (Windows) INT GetCryptoKeyIV(LPSTR &lpCryptoKeyIV, INT &lenCryptoKeyIV);
INT SetCryptoKeyIV(LPCSTR lpCryptoKeyIV, INT lenCryptoKeyIV);
int pkiproxy_crypto_getcryptokeyiv(void* lpObj, char** lpCryptoKeyIV, int* lenCryptoKeyIV);
int pkiproxy_crypto_setcryptokeyiv(void* lpObj, const char* lpCryptoKeyIV, int lenCryptoKeyIV);
QByteArray GetCryptoKeyIV();
int SetCryptoKeyIV(QByteArray qbaCryptoKeyIV);
Remarks
The initialization vector (IV) of a symmetric key. This is normally a public part of a symmetric key, the idea of which is to introduce randomness to the encrypted dataand/or serve as a first block in chaining ciphers.
This property is not available at design time.
Data Type
Byte Array
CryptoKeyKeyType Property (Crypto Class)
The type of the key contained in the object.
Syntax
ANSI (Cross Platform) int GetCryptoKeyKeyType();
int SetCryptoKeyKeyType(int iCryptoKeyKeyType); Unicode (Windows) INT GetCryptoKeyKeyType();
INT SetCryptoKeyKeyType(INT iCryptoKeyKeyType);
Possible Values
CKT_UNKNOWN(0),
CKT_PUBLIC(1),
CKT_PRIVATE(2),
CKT_SYMMETRIC(3),
CKT_DOMAIN_PARAMS(4),
CKT_GENERIC(5)
int pkiproxy_crypto_getcryptokeykeytype(void* lpObj);
int pkiproxy_crypto_setcryptokeykeytype(void* lpObj, int iCryptoKeyKeyType);
int GetCryptoKeyKeyType();
int SetCryptoKeyKeyType(int iCryptoKeyKeyType);
Default Value
0
Remarks
The type of the key contained in the object.
Use this property to establish the key type.
This property is not available at design time.
Data Type
Integer
CryptoKeyMechanism Property (Crypto Class)
The algorithm of the cryptographic key.
Syntax
ANSI (Cross Platform) char* GetCryptoKeyMechanism();
int SetCryptoKeyMechanism(const char* lpszCryptoKeyMechanism); Unicode (Windows) LPWSTR GetCryptoKeyMechanism();
INT SetCryptoKeyMechanism(LPCWSTR lpszCryptoKeyMechanism);
char* pkiproxy_crypto_getcryptokeymechanism(void* lpObj);
int pkiproxy_crypto_setcryptokeymechanism(void* lpObj, const char* lpszCryptoKeyMechanism);
QString GetCryptoKeyMechanism();
int SetCryptoKeyMechanism(QString qsCryptoKeyMechanism);
Default Value
""
Remarks
The algorithm of the cryptographic key. A cryptokey object may hold either symmetric, MAC, or public key.Public key algorithms: RSA, ECDSA, Elgamal, DH.
This property is not available at design time.
Data Type
String
CryptoKeyMechanismParams Property (Crypto Class)
The parameters of the key algorithm, such as Curve for ECDSA keys or domain parameters for DH keys.
Syntax
ANSI (Cross Platform) char* GetCryptoKeyMechanismParams();
int SetCryptoKeyMechanismParams(const char* lpszCryptoKeyMechanismParams); Unicode (Windows) LPWSTR GetCryptoKeyMechanismParams();
INT SetCryptoKeyMechanismParams(LPCWSTR lpszCryptoKeyMechanismParams);
char* pkiproxy_crypto_getcryptokeymechanismparams(void* lpObj);
int pkiproxy_crypto_setcryptokeymechanismparams(void* lpObj, const char* lpszCryptoKeyMechanismParams);
QString GetCryptoKeyMechanismParams();
int SetCryptoKeyMechanismParams(QString qsCryptoKeyMechanismParams);
Default Value
""
Remarks
The parameters of the key algorithm, such as Curve for ECDSA keys or domain parameters for DH keys.
This property is not available at design time.
Data Type
String
CryptoKeyNonce Property (Crypto Class)
A nonce value associated with a key.
Syntax
ANSI (Cross Platform) int GetCryptoKeyNonce(char* &lpCryptoKeyNonce, int &lenCryptoKeyNonce);
int SetCryptoKeyNonce(const char* lpCryptoKeyNonce, int lenCryptoKeyNonce); Unicode (Windows) INT GetCryptoKeyNonce(LPSTR &lpCryptoKeyNonce, INT &lenCryptoKeyNonce);
INT SetCryptoKeyNonce(LPCSTR lpCryptoKeyNonce, INT lenCryptoKeyNonce);
int pkiproxy_crypto_getcryptokeynonce(void* lpObj, char** lpCryptoKeyNonce, int* lenCryptoKeyNonce);
int pkiproxy_crypto_setcryptokeynonce(void* lpObj, const char* lpCryptoKeyNonce, int lenCryptoKeyNonce);
QByteArray GetCryptoKeyNonce();
int SetCryptoKeyNonce(QByteArray qbaCryptoKeyNonce);
Remarks
A nonce value associated with a key. It is similar to IV, but its only purpose is to introduce randomness.
This property is not available at design time.
Data Type
Byte Array
CryptoKeyNonPublic Property (Crypto Class)
Returns True if the object is private, and False otherwise.
Syntax
ANSI (Cross Platform) int GetCryptoKeyNonPublic();
int SetCryptoKeyNonPublic(int bCryptoKeyNonPublic); Unicode (Windows) BOOL GetCryptoKeyNonPublic();
INT SetCryptoKeyNonPublic(BOOL bCryptoKeyNonPublic);
int pkiproxy_crypto_getcryptokeynonpublic(void* lpObj);
int pkiproxy_crypto_setcryptokeynonpublic(void* lpObj, int bCryptoKeyNonPublic);
bool GetCryptoKeyNonPublic();
int SetCryptoKeyNonPublic(bool bCryptoKeyNonPublic);
Default Value
FALSE
Remarks
Returns True if the object is private, and False otherwise.
This property is not available at design time.
Data Type
Boolean
CryptoKeyOrigin Property (Crypto Class)
Returns the origin (the Storage ID) of this key.
Syntax
ANSI (Cross Platform) char* GetCryptoKeyOrigin();
int SetCryptoKeyOrigin(const char* lpszCryptoKeyOrigin); Unicode (Windows) LPWSTR GetCryptoKeyOrigin();
INT SetCryptoKeyOrigin(LPCWSTR lpszCryptoKeyOrigin);
char* pkiproxy_crypto_getcryptokeyorigin(void* lpObj);
int pkiproxy_crypto_setcryptokeyorigin(void* lpObj, const char* lpszCryptoKeyOrigin);
QString GetCryptoKeyOrigin();
int SetCryptoKeyOrigin(QString qsCryptoKeyOrigin);
Default Value
""
Remarks
Returns the origin (the Storage ID) of this key.
This property is not available at design time.
Data Type
String
CryptoKeyPersistent Property (Crypto Class)
Returns True if the object is persistent in the store.
Syntax
ANSI (Cross Platform) int GetCryptoKeyPersistent();
int SetCryptoKeyPersistent(int bCryptoKeyPersistent); Unicode (Windows) BOOL GetCryptoKeyPersistent();
INT SetCryptoKeyPersistent(BOOL bCryptoKeyPersistent);
int pkiproxy_crypto_getcryptokeypersistent(void* lpObj);
int pkiproxy_crypto_setcryptokeypersistent(void* lpObj, int bCryptoKeyPersistent);
bool GetCryptoKeyPersistent();
int SetCryptoKeyPersistent(bool bCryptoKeyPersistent);
Default Value
FALSE
Remarks
Returns True if the object is persistent in the store.
This property is not available at design time.
Data Type
Boolean
CryptoKeyProperties Property (Crypto Class)
Returns a collection of object properties as a comma separated name=value list.
Syntax
ANSI (Cross Platform) char* GetCryptoKeyProperties();
int SetCryptoKeyProperties(const char* lpszCryptoKeyProperties); Unicode (Windows) LPWSTR GetCryptoKeyProperties();
INT SetCryptoKeyProperties(LPCWSTR lpszCryptoKeyProperties);
char* pkiproxy_crypto_getcryptokeyproperties(void* lpObj);
int pkiproxy_crypto_setcryptokeyproperties(void* lpObj, const char* lpszCryptoKeyProperties);
QString GetCryptoKeyProperties();
int SetCryptoKeyProperties(QString qsCryptoKeyProperties);
Default Value
""
Remarks
Returns a collection of object properties as a comma separated name=value list.
This property is not available at design time.
Data Type
String
CryptoKeyReadOnly Property (Crypto Class)
Returns True if the object is readonly.
Syntax
ANSI (Cross Platform) int GetCryptoKeyReadOnly();
int SetCryptoKeyReadOnly(int bCryptoKeyReadOnly); Unicode (Windows) BOOL GetCryptoKeyReadOnly();
INT SetCryptoKeyReadOnly(BOOL bCryptoKeyReadOnly);
int pkiproxy_crypto_getcryptokeyreadonly(void* lpObj);
int pkiproxy_crypto_setcryptokeyreadonly(void* lpObj, int bCryptoKeyReadOnly);
bool GetCryptoKeyReadOnly();
int SetCryptoKeyReadOnly(bool bCryptoKeyReadOnly);
Default Value
FALSE
Remarks
Returns True if the object is readonly.
This property is not available at design time.
Data Type
Boolean
CryptoKeySensitive Property (Crypto Class)
Returns True if the object is sensitive, and False otherwise.
Syntax
ANSI (Cross Platform) int GetCryptoKeySensitive();
int SetCryptoKeySensitive(int bCryptoKeySensitive); Unicode (Windows) BOOL GetCryptoKeySensitive();
INT SetCryptoKeySensitive(BOOL bCryptoKeySensitive);
int pkiproxy_crypto_getcryptokeysensitive(void* lpObj);
int pkiproxy_crypto_setcryptokeysensitive(void* lpObj, int bCryptoKeySensitive);
bool GetCryptoKeySensitive();
int SetCryptoKeySensitive(bool bCryptoKeySensitive);
Default Value
FALSE
Remarks
Returns True if the object is sensitive, and False otherwise.
This property is not available at design time.
Data Type
Boolean
CryptoKeySize Property (Crypto Class)
The size of the object in bytes.
Syntax
ANSI (Cross Platform) int GetCryptoKeySize();
int SetCryptoKeySize(int iCryptoKeySize); Unicode (Windows) INT GetCryptoKeySize();
INT SetCryptoKeySize(INT iCryptoKeySize);
int pkiproxy_crypto_getcryptokeysize(void* lpObj);
int pkiproxy_crypto_setcryptokeysize(void* lpObj, int iCryptoKeySize);
int GetCryptoKeySize();
int SetCryptoKeySize(int iCryptoKeySize);
Default Value
0
Remarks
The size of the object in bytes
This property is not available at design time.
Data Type
Integer
CryptoKeySubject Property (Crypto Class)
Returns the key subject.
Syntax
ANSI (Cross Platform) char* GetCryptoKeySubject();
int SetCryptoKeySubject(const char* lpszCryptoKeySubject); Unicode (Windows) LPWSTR GetCryptoKeySubject();
INT SetCryptoKeySubject(LPCWSTR lpszCryptoKeySubject);
char* pkiproxy_crypto_getcryptokeysubject(void* lpObj);
int pkiproxy_crypto_setcryptokeysubject(void* lpObj, const char* lpszCryptoKeySubject);
QString GetCryptoKeySubject();
int SetCryptoKeySubject(QString qsCryptoKeySubject);
Default Value
""
Remarks
Returns the key subject. This is a cryptoprovider-dependent value,which normally aims to provide some user-friendly insight into thekey owner.
This property is not available at design time.
Data Type
String
CryptoKeyUserId Property (Crypto Class)
TBD.
Syntax
ANSI (Cross Platform) char* GetCryptoKeyUserId();
int SetCryptoKeyUserId(const char* lpszCryptoKeyUserId); Unicode (Windows) LPWSTR GetCryptoKeyUserId();
INT SetCryptoKeyUserId(LPCWSTR lpszCryptoKeyUserId);
char* pkiproxy_crypto_getcryptokeyuserid(void* lpObj);
int pkiproxy_crypto_setcryptokeyuserid(void* lpObj, const char* lpszCryptoKeyUserId);
QString GetCryptoKeyUserId();
int SetCryptoKeyUserId(QString qsCryptoKeyUserId);
Default Value
""
Remarks
TBD
This property is not available at design time.
Data Type
String
CryptoKeyUserKeySecret Property (Crypto Class)
TBD.
Syntax
ANSI (Cross Platform) char* GetCryptoKeyUserKeySecret();
int SetCryptoKeyUserKeySecret(const char* lpszCryptoKeyUserKeySecret); Unicode (Windows) LPWSTR GetCryptoKeyUserKeySecret();
INT SetCryptoKeyUserKeySecret(LPCWSTR lpszCryptoKeyUserKeySecret);
char* pkiproxy_crypto_getcryptokeyuserkeysecret(void* lpObj);
int pkiproxy_crypto_setcryptokeyuserkeysecret(void* lpObj, const char* lpszCryptoKeyUserKeySecret);
QString GetCryptoKeyUserKeySecret();
int SetCryptoKeyUserKeySecret(QString qsCryptoKeyUserKeySecret);
Default Value
""
Remarks
TBD
This property is not available at design time.
Data Type
String
CryptoKeyValid Property (Crypto Class)
Returns True if this key is valid.
Syntax
ANSI (Cross Platform) int GetCryptoKeyValid();
int SetCryptoKeyValid(int bCryptoKeyValid); Unicode (Windows) BOOL GetCryptoKeyValid();
INT SetCryptoKeyValid(BOOL bCryptoKeyValid);
int pkiproxy_crypto_getcryptokeyvalid(void* lpObj);
int pkiproxy_crypto_setcryptokeyvalid(void* lpObj, int bCryptoKeyValid);
bool GetCryptoKeyValid();
int SetCryptoKeyValid(bool bCryptoKeyValid);
Default Value
FALSE
Remarks
Returns True if this key is valid. The term Valid highly depends onthe kind of the key being stored. A symmetric key is considered validif its length fits the algorithm being set. The validity of anRSA key also ensures that the RSA key elements (primes, exponents,and modulus) are consistent.
This property is not available at design time.
Data Type
Boolean
CryptoKeyValidFrom Property (Crypto Class)
The time point at which the key becomes valid, in UTC.
Syntax
ANSI (Cross Platform) char* GetCryptoKeyValidFrom();
int SetCryptoKeyValidFrom(const char* lpszCryptoKeyValidFrom); Unicode (Windows) LPWSTR GetCryptoKeyValidFrom();
INT SetCryptoKeyValidFrom(LPCWSTR lpszCryptoKeyValidFrom);
char* pkiproxy_crypto_getcryptokeyvalidfrom(void* lpObj);
int pkiproxy_crypto_setcryptokeyvalidfrom(void* lpObj, const char* lpszCryptoKeyValidFrom);
QString GetCryptoKeyValidFrom();
int SetCryptoKeyValidFrom(QString qsCryptoKeyValidFrom);
Default Value
""
Remarks
The time point at which the key becomes valid, in UTC.
This property is not available at design time.
Data Type
String
CryptoKeyValidTo Property (Crypto Class)
The time point at which the key expires, in UTC.
Syntax
ANSI (Cross Platform) char* GetCryptoKeyValidTo();
int SetCryptoKeyValidTo(const char* lpszCryptoKeyValidTo); Unicode (Windows) LPWSTR GetCryptoKeyValidTo();
INT SetCryptoKeyValidTo(LPCWSTR lpszCryptoKeyValidTo);
char* pkiproxy_crypto_getcryptokeyvalidto(void* lpObj);
int pkiproxy_crypto_setcryptokeyvalidto(void* lpObj, const char* lpszCryptoKeyValidTo);
QString GetCryptoKeyValidTo();
int SetCryptoKeyValidTo(QString qsCryptoKeyValidTo);
Default Value
""
Remarks
The time point at which the key expires, in UTC.
This property is not available at design time.
Data Type
String
CryptoKeyValue Property (Crypto Class)
The byte array representation of the key.
Syntax
ANSI (Cross Platform) int GetCryptoKeyValue(char* &lpCryptoKeyValue, int &lenCryptoKeyValue);
int SetCryptoKeyValue(const char* lpCryptoKeyValue, int lenCryptoKeyValue); Unicode (Windows) INT GetCryptoKeyValue(LPSTR &lpCryptoKeyValue, INT &lenCryptoKeyValue);
INT SetCryptoKeyValue(LPCSTR lpCryptoKeyValue, INT lenCryptoKeyValue);
int pkiproxy_crypto_getcryptokeyvalue(void* lpObj, char** lpCryptoKeyValue, int* lenCryptoKeyValue);
int pkiproxy_crypto_setcryptokeyvalue(void* lpObj, const char* lpCryptoKeyValue, int lenCryptoKeyValue);
QByteArray GetCryptoKeyValue();
int SetCryptoKeyValue(QByteArray qbaCryptoKeyValue);
Remarks
The byte array representation of the key. This may not be available for non-CryptoKeyExportable keys.
This property is not available at design time.
Data Type
Byte Array
InputEncoding Property (Crypto Class)
The encoding to apply to the input data.
Syntax
ANSI (Cross Platform) int GetInputEncoding();
int SetInputEncoding(int iInputEncoding); Unicode (Windows) INT GetInputEncoding();
INT SetInputEncoding(INT iInputEncoding);
Possible Values
CET_DEFAULT(0),
CET_BINARY(1),
CET_BASE_64(2),
CET_COMPACT(3),
CET_JSON(4)
int pkiproxy_crypto_getinputencoding(void* lpObj);
int pkiproxy_crypto_setinputencoding(void* lpObj, int iInputEncoding);
int GetInputEncoding();
int SetInputEncoding(int iInputEncoding);
Default Value
0
Remarks
Use this property to specify the encoding to apply to the input data.
Data Type
Integer
InputIsHash Property (Crypto Class)
Indicates whether the input data contains the hash or the actual data.
Syntax
ANSI (Cross Platform) int GetInputIsHash();
int SetInputIsHash(int bInputIsHash); Unicode (Windows) BOOL GetInputIsHash();
INT SetInputIsHash(BOOL bInputIsHash);
int pkiproxy_crypto_getinputishash(void* lpObj);
int pkiproxy_crypto_setinputishash(void* lpObj, int bInputIsHash);
bool GetInputIsHash();
int SetInputIsHash(bool bInputIsHash);
Default Value
FALSE
Remarks
Set this property to true to tell the class that the data you are passing to it is the hash of the data, rather than the actual (unhashed) data. If this property is set to false, class will hash the provided data internally if it is assumed by the algorithm.
This property is not available at design time.
Data Type
Boolean
KeySize Property (Crypto Class)
Returns the cryptographic key size in bytes.
Syntax
ANSI (Cross Platform) int GetKeySize(); Unicode (Windows) INT GetKeySize();
int pkiproxy_crypto_getkeysize(void* lpObj);
int GetKeySize();
Default Value
0
Remarks
Use this property to read the cryptographic key size. For the majority of the symmetric algorithms this is hard-coded in the algorithm itself (such as 16 bytes for AES128), but may be variable for certain exceptions, such as Blowfish or RC4.
This property is read-only.
Data Type
Integer
Mechanism Property (Crypto Class)
The security mechanism to be used during the crypto operation.
Syntax
ANSI (Cross Platform) char* GetMechanism();
int SetMechanism(const char* lpszMechanism); Unicode (Windows) LPWSTR GetMechanism();
INT SetMechanism(LPCWSTR lpszMechanism);
char* pkiproxy_crypto_getmechanism(void* lpObj);
int pkiproxy_crypto_setmechanism(void* lpObj, const char* lpszMechanism);
QString GetMechanism();
int SetMechanism(QString qsMechanism);
Default Value
"sha256WithRSAEncryption"
Remarks
Use this property to provide the name of the algorithm, in the form supported by the key store, that should be used for the cryptographic operation. If left empty, the default algorithm (deducible from the key) will be used.
Data Type
String
Nonce Property (Crypto Class)
Specifies the Nonce value to employ.
Syntax
ANSI (Cross Platform) int GetNonce(char* &lpNonce, int &lenNonce);
int SetNonce(const char* lpNonce, int lenNonce); Unicode (Windows) INT GetNonce(LPSTR &lpNonce, INT &lenNonce);
INT SetNonce(LPCSTR lpNonce, INT lenNonce);
int pkiproxy_crypto_getnonce(void* lpObj, char** lpNonce, int* lenNonce);
int pkiproxy_crypto_setnonce(void* lpObj, const char* lpNonce, int lenNonce);
QByteArray GetNonce();
int SetNonce(QByteArray qbaNonce);
Remarks
Use this property to specify the Nonce value for the symmetric operation. Not every algorithm or modeuses nonce.
This property is not available at design time.
Data Type
Byte Array
OutputEncoding Property (Crypto Class)
The encoding type to apply to the output data.
Syntax
ANSI (Cross Platform) int GetOutputEncoding();
int SetOutputEncoding(int iOutputEncoding); Unicode (Windows) INT GetOutputEncoding();
INT SetOutputEncoding(INT iOutputEncoding);
Possible Values
CET_DEFAULT(0),
CET_BINARY(1),
CET_BASE_64(2),
CET_COMPACT(3),
CET_JSON(4)
int pkiproxy_crypto_getoutputencoding(void* lpObj);
int pkiproxy_crypto_setoutputencoding(void* lpObj, int iOutputEncoding);
int GetOutputEncoding();
int SetOutputEncoding(int iOutputEncoding);
Default Value
0
Remarks
Use this property to specify the encoding type to apply to the protected data.
Data Type
Integer
Padding Property (Crypto Class)
The padding type to apply to the encrypted data.
Syntax
ANSI (Cross Platform) int GetPadding();
int SetPadding(int iPadding); Unicode (Windows) INT GetPadding();
INT SetPadding(INT iPadding);
Possible Values
SCP_NONE(0),
SCP_PKCS5(1),
SCP_ANSIX923(2)
int pkiproxy_crypto_getpadding(void* lpObj);
int pkiproxy_crypto_setpadding(void* lpObj, int iPadding);
int GetPadding();
int SetPadding(int iPadding);
Default Value
1
Remarks
Use this property to specify the padding type to use with the encrypted data. A paddingtype commonly used in modern security environments is PKCS#5.
Data Type
Integer
ParCount Property (Crypto Class)
The number of records in the Par arrays.
Syntax
ANSI (Cross Platform) int GetParCount();
int SetParCount(int iParCount); Unicode (Windows) INT GetParCount();
INT SetParCount(INT iParCount);
int pkiproxy_crypto_getparcount(void* lpObj);
int pkiproxy_crypto_setparcount(void* lpObj, int iParCount);
int GetParCount();
int SetParCount(int iParCount);
Default Value
0
Remarks
This property controls the size of the following arrays:
The array indices start at 0 and end at ParCount - 1.This property is not available at design time.
Data Type
Integer
ParName Property (Crypto Class)
The name element in a (name, value) pair.
Syntax
ANSI (Cross Platform) char* GetParName(int iParIndex);
int SetParName(int iParIndex, const char* lpszParName); Unicode (Windows) LPWSTR GetParName(INT iParIndex);
INT SetParName(INT iParIndex, LPCWSTR lpszParName);
char* pkiproxy_crypto_getparname(void* lpObj, int parindex);
int pkiproxy_crypto_setparname(void* lpObj, int parindex, const char* lpszParName);
QString GetParName(int iParIndex);
int SetParName(int iParIndex, QString qsParName);
Default Value
""
Remarks
The name element in a (name, value) pair.
The ParIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ParCount property.
This property is not available at design time.
Data Type
String
ParValue Property (Crypto Class)
The value element in a (name, value) pair.
Syntax
ANSI (Cross Platform) char* GetParValue(int iParIndex);
int SetParValue(int iParIndex, const char* lpszParValue); Unicode (Windows) LPWSTR GetParValue(INT iParIndex);
INT SetParValue(INT iParIndex, LPCWSTR lpszParValue);
char* pkiproxy_crypto_getparvalue(void* lpObj, int parindex);
int pkiproxy_crypto_setparvalue(void* lpObj, int parindex, const char* lpszParValue);
QString GetParValue(int iParIndex);
int SetParValue(int iParIndex, QString qsParValue);
Default Value
""
Remarks
The value element in a (name, value) pair.
The ParIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ParCount property.
This property is not available at design time.
Data Type
String
SessionClientAuthenticated Property (Crypto Class)
Specifies whether client authentication was performed during this connection.
Syntax
ANSI (Cross Platform) int GetSessionClientAuthenticated(); Unicode (Windows) BOOL GetSessionClientAuthenticated();
int pkiproxy_crypto_getsessionclientauthenticated(void* lpObj);
bool GetSessionClientAuthenticated();
Default Value
FALSE
Remarks
Specifies whether client authentication was performed during this connection.
This property is read-only.
Data Type
Boolean
SessionClientAuthRequested Property (Crypto Class)
Specifies whether client authentication was requested during this connection.
Syntax
ANSI (Cross Platform) int GetSessionClientAuthRequested(); Unicode (Windows) BOOL GetSessionClientAuthRequested();
int pkiproxy_crypto_getsessionclientauthrequested(void* lpObj);
bool GetSessionClientAuthRequested();
Default Value
FALSE
Remarks
Specifies whether client authentication was requested during this connection.
This property is read-only.
Data Type
Boolean
SessionClientCredential Property (Crypto Class)
Contains the client credential that was used for authentication (e.
Syntax
ANSI (Cross Platform) char* GetSessionClientCredential(); Unicode (Windows) LPWSTR GetSessionClientCredential();
char* pkiproxy_crypto_getsessionclientcredential(void* lpObj);
QString GetSessionClientCredential();
Default Value
""
Remarks
Contains the client credential that was used for authentication (e.g. the certificate)
This property is read-only.
Data Type
String
SessionConnectionEstablished Property (Crypto Class)
Indicates whether the connection has been established fully.
Syntax
ANSI (Cross Platform) int GetSessionConnectionEstablished(); Unicode (Windows) BOOL GetSessionConnectionEstablished();
int pkiproxy_crypto_getsessionconnectionestablished(void* lpObj);
bool GetSessionConnectionEstablished();
Default Value
FALSE
Remarks
Indicates whether the connection has been established fully.
This property is read-only.
Data Type
Boolean
SessionConnectionLog Property (Crypto Class)
Contains the connection log.
Syntax
ANSI (Cross Platform) char* GetSessionConnectionLog(); Unicode (Windows) LPWSTR GetSessionConnectionLog();
char* pkiproxy_crypto_getsessionconnectionlog(void* lpObj);
QString GetSessionConnectionLog();
Default Value
""
Remarks
Contains the connection log. This information may be useful in investigating connection issues.
This property is read-only.
Data Type
String
SessionOperationMessage Property (Crypto Class)
Contains the status string of the last operation.
Syntax
ANSI (Cross Platform) char* GetSessionOperationMessage(); Unicode (Windows) LPWSTR GetSessionOperationMessage();
char* pkiproxy_crypto_getsessionoperationmessage(void* lpObj);
QString GetSessionOperationMessage();
Default Value
""
Remarks
Contains the status string of the last operation.
This property is read-only.
Data Type
String
SessionOperationStatus Property (Crypto Class)
Contains the status code of the last operation.
Syntax
ANSI (Cross Platform) int GetSessionOperationStatus(); Unicode (Windows) INT GetSessionOperationStatus();
int pkiproxy_crypto_getsessionoperationstatus(void* lpObj);
int GetSessionOperationStatus();
Default Value
0
Remarks
Contains the status code of the last operation.
This property is read-only.
Data Type
Integer
SessionProtection Property (Crypto Class)
The protection parameters employed by this connection.
Syntax
ANSI (Cross Platform) char* GetSessionProtection(); Unicode (Windows) LPWSTR GetSessionProtection();
char* pkiproxy_crypto_getsessionprotection(void* lpObj);
QString GetSessionProtection();
Default Value
""
Remarks
The protection parameters employed by this connection.
For TLS connections, this property returns the ciphersuite that was/is employed by the connection, e.g: TLS:RSA-AES256-SHA256
This property is read-only.
Data Type
String
SessionSecureConnection Property (Crypto Class)
Indicates whether TLS or SSL is enabled for this connection.
Syntax
ANSI (Cross Platform) int GetSessionSecureConnection(); Unicode (Windows) BOOL GetSessionSecureConnection();
int pkiproxy_crypto_getsessionsecureconnection(void* lpObj);
bool GetSessionSecureConnection();
Default Value
FALSE
Remarks
Indicates whether TLS or SSL is enabled for this connection.
This property is read-only.
Data Type
Boolean
SessionServiceAuthenticated Property (Crypto Class)
Indicates whether service authentication was performed during a TLS-enabled or otherwise protected connection.
Syntax
ANSI (Cross Platform) int GetSessionServiceAuthenticated(); Unicode (Windows) BOOL GetSessionServiceAuthenticated();
int pkiproxy_crypto_getsessionserviceauthenticated(void* lpObj);
bool GetSessionServiceAuthenticated();
Default Value
FALSE
Remarks
Indicates whether service authentication was performed during a TLS-enabled or otherwise protected connection.
This property is read-only.
Data Type
Boolean
SessionServiceCredential Property (Crypto Class)
Contains the service credential that was used for authentication (e.
Syntax
ANSI (Cross Platform) char* GetSessionServiceCredential(); Unicode (Windows) LPWSTR GetSessionServiceCredential();
char* pkiproxy_crypto_getsessionservicecredential(void* lpObj);
QString GetSessionServiceCredential();
Default Value
""
Remarks
Contains the service credential that was used for authentication (e.g. the certificate)
This property is read-only.
Data Type
String
SessionSessionID Property (Crypto Class)
The unique identifier assigned to this session.
Syntax
ANSI (Cross Platform) char* GetSessionSessionID(); Unicode (Windows) LPWSTR GetSessionSessionID();
char* pkiproxy_crypto_getsessionsessionid(void* lpObj);
QString GetSessionSessionID();
Default Value
""
Remarks
The unique identifier assigned to this session.
This property is read-only and not available at design time.
Data Type
String
SessionTotalBytesReceived Property (Crypto Class)
The total number of bytes received over this connection.
Syntax
ANSI (Cross Platform) int64 GetSessionTotalBytesReceived(); Unicode (Windows) LONG64 GetSessionTotalBytesReceived();
int64 pkiproxy_crypto_getsessiontotalbytesreceived(void* lpObj);
qint64 GetSessionTotalBytesReceived();
Default Value
0
Remarks
The total number of bytes received over this connection.
This property is read-only.
Data Type
Long64
SessionTotalBytesSent Property (Crypto Class)
The total number of bytes sent over this connection.
Syntax
ANSI (Cross Platform) int64 GetSessionTotalBytesSent(); Unicode (Windows) LONG64 GetSessionTotalBytesSent();
int64 pkiproxy_crypto_getsessiontotalbytessent(void* lpObj);
qint64 GetSessionTotalBytesSent();
Default Value
0
Remarks
The total number of bytes sent over this connection.
This property is read-only.
Data Type
Long64
SignatureValidationResult Property (Crypto Class)
The signature validation result.
Syntax
ANSI (Cross Platform) int GetSignatureValidationResult(); Unicode (Windows) INT GetSignatureValidationResult();
Possible Values
SVT_VALID(0),
SVT_UNKNOWN(1),
SVT_CORRUPTED(2),
SVT_SIGNER_NOT_FOUND(3),
SVT_FAILURE(4)
int pkiproxy_crypto_getsignaturevalidationresult(void* lpObj);
int GetSignatureValidationResult();
Default Value
1
Remarks
Use this property to check the result of the most recent signature validation.
This property is read-only and not available at design time.
Data Type
Integer
StreamCipher Property (Crypto Class)
Returns true if the selected algorithms works as a stream cipher.
Syntax
ANSI (Cross Platform) int GetStreamCipher(); Unicode (Windows) BOOL GetStreamCipher();
int pkiproxy_crypto_getstreamcipher(void* lpObj);
bool GetStreamCipher();
Default Value
FALSE
Remarks
This property returns true if the selected algorithm processes data as a stream (byte-by-byte), rather than block-by-block. This affects the need to use a proper padding settings.
This property is read-only and not available at design time.
Data Type
Boolean
SymmetricMode Property (Crypto Class)
Specifies the symmetric cipher mode of operation.
Syntax
ANSI (Cross Platform) int GetSymmetricMode();
int SetSymmetricMode(int iSymmetricMode); Unicode (Windows) INT GetSymmetricMode();
INT SetSymmetricMode(INT iSymmetricMode);
Possible Values
SCM_DEFAULT(0),
SCM_ECB(1),
SCM_CBC(2),
SCM_CTR(3),
SCM_CFB8(4),
SCM_GCM(5),
SCM_CCM(6),
SCM_POLY_1305(7)
int pkiproxy_crypto_getsymmetricmode(void* lpObj);
int pkiproxy_crypto_setsymmetricmode(void* lpObj, int iSymmetricMode);
int GetSymmetricMode();
int SetSymmetricMode(int iSymmetricMode);
Default Value
0
Remarks
Use this property to specify the mode of operation as required by your environment. The defaultsetting is CBC.
Data Type
Integer
UserId Property (Crypto Class)
TBD.
Syntax
ANSI (Cross Platform) char* GetUserId();
int SetUserId(const char* lpszUserId); Unicode (Windows) LPWSTR GetUserId();
INT SetUserId(LPCWSTR lpszUserId);
char* pkiproxy_crypto_getuserid(void* lpObj);
int pkiproxy_crypto_setuserid(void* lpObj, const char* lpszUserId);
QString GetUserId();
int SetUserId(QString qsUserId);
Default Value
""
Remarks
TBD
This property is not available at design time.
Data Type
String
UserKeySecret Property (Crypto Class)
TBD.
Syntax
ANSI (Cross Platform) char* GetUserKeySecret();
int SetUserKeySecret(const char* lpszUserKeySecret); Unicode (Windows) LPWSTR GetUserKeySecret();
INT SetUserKeySecret(LPCWSTR lpszUserKeySecret);
char* pkiproxy_crypto_getuserkeysecret(void* lpObj);
int pkiproxy_crypto_setuserkeysecret(void* lpObj, const char* lpszUserKeySecret);
QString GetUserKeySecret();
int SetUserKeySecret(QString qsUserKeySecret);
Default Value
""
Remarks
TBD
This property is not available at design time.
Data Type
String
Config Method (Crypto Class)
Sets or retrieves a configuration setting.
Syntax
ANSI (Cross Platform) char* Config(const char* lpszConfigurationString); Unicode (Windows) LPWSTR Config(LPCWSTR lpszConfigurationString);
char* pkiproxy_crypto_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.
Decrypt Method (Crypto Class)
Decrypts a buffer.
Syntax
ANSI (Cross Platform) char* Decrypt(const char* lpBuffer, int lenBuffer, int *lpSize = NULL); Unicode (Windows) LPSTR Decrypt(LPCSTR lpBuffer, INT lenBuffer, LPINT lpSize = NULL);
char* pkiproxy_crypto_decrypt(void* lpObj, const char* lpBuffer, int lenBuffer, int *lpSize);
QByteArray Decrypt(QByteArray qbaBuffer);
Remarks
Use this method to decrypt a byte array and get the encrypted message in another byte array.
Specify the decryption key in CryptoKey property before calling this method.
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.
DecryptFile Method (Crypto Class)
Decrypts a file.
Syntax
ANSI (Cross Platform) int DecryptFile(const char* lpszSourceFile, const char* lpszDestFile); Unicode (Windows) INT DecryptFile(LPCWSTR lpszSourceFile, LPCWSTR lpszDestFile);
int pkiproxy_crypto_decryptfile(void* lpObj, const char* lpszSourceFile, const char* lpszDestFile);
int DecryptFile(const QString& qsSourceFile, const QString& qsDestFile);
Remarks
Use this method to decrypt an encrypted file and save the decrypted data to another file.
Specify the decryption key in CryptoKey property before calling this method.
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.)
DecryptFinal Method (Crypto Class)
Finalization of decryption by blocks.
Syntax
ANSI (Cross Platform) char* DecryptFinal(int *lpSize = NULL); Unicode (Windows) LPSTR DecryptFinal(LPINT lpSize = NULL);
char* pkiproxy_crypto_decryptfinal(void* lpObjint *lpSize);
QByteArray DecryptFinal();
Remarks
Use this method to finalize of decryption by blocks.
Specify decryption key in CryptoKey property.
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.
DecryptInit Method (Crypto Class)
Initializes a per-block decryption process.
Syntax
ANSI (Cross Platform) int DecryptInit(); Unicode (Windows) INT DecryptInit();
int pkiproxy_crypto_decryptinit(void* lpObj);
int DecryptInit();
Remarks
Use this method to start a block-by-block decryption process.
Specify the decryption key in CryptoKey property before starting the decryption.
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.)
DecryptUpdate Method (Crypto Class)
Decrypts the next block of encrypted data.
Syntax
ANSI (Cross Platform) char* DecryptUpdate(const char* lpBuffer, int lenBuffer, int *lpSize = NULL); Unicode (Windows) LPSTR DecryptUpdate(LPCSTR lpBuffer, INT lenBuffer, LPINT lpSize = NULL);
char* pkiproxy_crypto_decryptupdate(void* lpObj, const char* lpBuffer, int lenBuffer, int *lpSize);
QByteArray DecryptUpdate(QByteArray qbaBuffer);
Remarks
When using block-by-block decryption, pass every subsequent block of the encryptedmessage to this method until the entire message is processed. For each encryptedblock the method returns a piece of decrypted data.
Please note that in general case there is no direct correspondence between the data actuallycontained in the encrypted block with the output of this method. The component maychoose to cache a piece of the provided buffer internally if it doesn't constitutea full block of encrypted data.
Remember to call DecryptInit before calling this method to prepare the controlfor the decryption process.
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.
Encrypt Method (Crypto Class)
Encrypts a buffer.
Syntax
ANSI (Cross Platform) char* Encrypt(const char* lpBuffer, int lenBuffer, int *lpSize = NULL); Unicode (Windows) LPSTR Encrypt(LPCSTR lpBuffer, INT lenBuffer, LPINT lpSize = NULL);
char* pkiproxy_crypto_encrypt(void* lpObj, const char* lpBuffer, int lenBuffer, int *lpSize);
QByteArray Encrypt(QByteArray qbaBuffer);
Remarks
Use this method to encrypt a byte array and get the protected message in another byte array.
Specify the encryption key in the CryptoKey property before commencing encryption.
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.
EncryptFile Method (Crypto Class)
Encrypts a file.
Syntax
ANSI (Cross Platform) int EncryptFile(const char* lpszSourceFile, const char* lpszDestFile); Unicode (Windows) INT EncryptFile(LPCWSTR lpszSourceFile, LPCWSTR lpszDestFile);
int pkiproxy_crypto_encryptfile(void* lpObj, const char* lpszSourceFile, const char* lpszDestFile);
int EncryptFile(const QString& qsSourceFile, const QString& qsDestFile);
Remarks
Use this method to encrypt a file and save the protected message to another file.
Specify the encryption key in CryptoKey property before commencing encryption.
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.)
EncryptFinal Method (Crypto Class)
Finalization of encryption by blocks.
Syntax
ANSI (Cross Platform) char* EncryptFinal(int *lpSize = NULL); Unicode (Windows) LPSTR EncryptFinal(LPINT lpSize = NULL);
char* pkiproxy_crypto_encryptfinal(void* lpObjint *lpSize);
QByteArray EncryptFinal();
Remarks
Use this method to finalize of encryption by blocks.
Specify encryption key in CryptoKey property.
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.
EncryptInit Method (Crypto Class)
Initializes a per-block encryption process.
Syntax
ANSI (Cross Platform) int EncryptInit(); Unicode (Windows) INT EncryptInit();
int pkiproxy_crypto_encryptinit(void* lpObj);
int EncryptInit();
Remarks
Use this method to initialize a block-by-block encryption process. Follow it with calls to EncryptUpdate (as many as needed), and complete the encryptionwith an EncryptFinal call.
Specify the encryption key in CryptoKey property before calling this method.
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.)
EncryptUpdate Method (Crypto Class)
Encrypts the next block of data.
Syntax
ANSI (Cross Platform) char* EncryptUpdate(const char* lpBuffer, int lenBuffer, int *lpSize = NULL); Unicode (Windows) LPSTR EncryptUpdate(LPCSTR lpBuffer, INT lenBuffer, LPINT lpSize = NULL);
char* pkiproxy_crypto_encryptupdate(void* lpObj, const char* lpBuffer, int lenBuffer, int *lpSize);
QByteArray EncryptUpdate(QByteArray qbaBuffer);
Remarks
Use this method to encrypt the next block of data contained in Buffer.
Call this method after calling EncryptInit for as many times as needed, until the wholevolume of data is processed. Having done that, call EncryptFinal to complete the encryptionand get the terminating encrypted trailer.
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.
Hash Method (Crypto Class)
Calculates a message digest over a byte array.
Syntax
ANSI (Cross Platform) char* Hash(const char* lpBuffer, int lenBuffer, int *lpSize = NULL); Unicode (Windows) LPSTR Hash(LPCSTR lpBuffer, INT lenBuffer, LPINT lpSize = NULL);
char* pkiproxy_crypto_hash(void* lpObj, const char* lpBuffer, int lenBuffer, int *lpSize);
QByteArray Hash(QByteArray qbaBuffer);
Remarks
This method calculates and returns a message digest over the content of Buffer. This is a quick way to calculate a hash over a byte array in one go.
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.
HashFile Method (Crypto Class)
Calculates a message digest over data contained in a file.
Syntax
ANSI (Cross Platform) char* HashFile(const char* lpszSourceFile, int *lpSize = NULL); Unicode (Windows) LPSTR HashFile(LPCWSTR lpszSourceFile, LPINT lpSize = NULL);
char* pkiproxy_crypto_hashfile(void* lpObj, const char* lpszSourceFile, int *lpSize);
QByteArray HashFile(const QString& qsSourceFile);
Remarks
This method calculates and returns a message digest over the data contained in file SourceFile. This is a quick way to calculate a hash over a file content in one go.
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.
HashFinal Method (Crypto Class)
Completes the hash and returns the resulting message digest.
Syntax
ANSI (Cross Platform) char* HashFinal(int *lpSize = NULL); Unicode (Windows) LPSTR HashFinal(LPINT lpSize = NULL);
char* pkiproxy_crypto_hashfinal(void* lpObjint *lpSize);
QByteArray HashFinal();
Remarks
This method finalizes the hashing operation and returns the message digest of the input data. Use it in conjunction with HashInit and HashUpdate methods to process data in chunks.
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.
HashInit Method (Crypto Class)
Resets the hash function context.
Syntax
ANSI (Cross Platform) int HashInit(); Unicode (Windows) INT HashInit();
int pkiproxy_crypto_hashinit(void* lpObj);
int HashInit();
Remarks
HashInit resets the context of the hash function, discarding any data passed to it previously.
Use this method to restart the hash calculation process from scratch.
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.)
HashUpdate Method (Crypto Class)
Feeds a chunk of data to the hash function.
Syntax
ANSI (Cross Platform) int HashUpdate(const char* lpBuffer, int lenBuffer); Unicode (Windows) INT HashUpdate(LPCSTR lpBuffer, INT lenBuffer);
int pkiproxy_crypto_hashupdate(void* lpObj, const char* lpBuffer, int lenBuffer);
int HashUpdate(QByteArray qbaBuffer);
Remarks
This method feeds Buffer to the hash function. Call this methodrepeatedly to pass your data to the hash function chunk by chunk.
Remember to initialize the hash function with a HashInit call beforestarting to feed data with this method. After the whole volume ofdata has been sent, complete the calculation and obtain the resultingmessage digest with a HashFinal call.
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.)
PerformAction Method (Crypto Class)
Performs a custom action and returns its result.
Syntax
ANSI (Cross Platform) char* PerformAction(const char* lpszAction, const char* lpszParam); Unicode (Windows) LPWSTR PerformAction(LPCWSTR lpszAction, LPCWSTR lpszParam);
char* pkiproxy_crypto_performaction(void* lpObj, const char* lpszAction, const char* lpszParam);
QString PerformAction(const QString& qsAction, const QString& qsParam);
Remarks
Use this method to perform secondary actions not available via the default API.
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.
RandomGenerate Method (Crypto Class)
Generates an array of random bytes.
Syntax
ANSI (Cross Platform) char* RandomGenerate(int iLen, int *lpSize = NULL); Unicode (Windows) LPSTR RandomGenerate(INT iLen, LPINT lpSize = NULL);
char* pkiproxy_crypto_randomgenerate(void* lpObj, int iLen, int *lpSize);
QByteArray RandomGenerate(int iLen);
Remarks
Call this method to generate an array of random bytes of length Len.
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.
RandomSeed Method (Crypto Class)
Seeds the generator with a data in a byte array.
Syntax
ANSI (Cross Platform) int RandomSeed(const char* lpValue, int lenValue); Unicode (Windows) INT RandomSeed(LPCSTR lpValue, INT lenValue);
int pkiproxy_crypto_randomseed(void* lpObj, const char* lpValue, int lenValue);
int RandomSeed(QByteArray qbaValue);
Remarks
Use this method to seed the generator with data provided in a byte array.
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.)
Sign Method (Crypto Class)
Signs a buffer.
Syntax
ANSI (Cross Platform) char* Sign(const char* lpBuffer, int lenBuffer, int bDetached, int *lpSize = NULL); Unicode (Windows) LPSTR Sign(LPCSTR lpBuffer, INT lenBuffer, BOOL bDetached, LPINT lpSize = NULL);
char* pkiproxy_crypto_sign(void* lpObj, const char* lpBuffer, int lenBuffer, int bDetached, int *lpSize);
QByteArray Sign(QByteArray qbaBuffer, bool bDetached);
Remarks
Use this method to sign a byte array and get the protected message in another byte array. Set the Detached parameter to false to create an enveloped/enveloping, rather than detached signature.Please note that certain signature algorithms/kinds only support detached signing.
Specify the signing key in CryptoKey property before commencing the signing.
Please note that the key assigned must have a private key part.
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.
SignFile Method (Crypto Class)
Signs a file.
Syntax
ANSI (Cross Platform) int SignFile(const char* lpszSourceFile, const char* lpszDestFile, int bDetached); Unicode (Windows) INT SignFile(LPCWSTR lpszSourceFile, LPCWSTR lpszDestFile, BOOL bDetached);
int pkiproxy_crypto_signfile(void* lpObj, const char* lpszSourceFile, const char* lpszDestFile, int bDetached);
int SignFile(const QString& qsSourceFile, const QString& qsDestFile, bool bDetached);
Remarks
Use this method to sign a file and save the protected message to another file.
Specify the signing key in CryptoKey property before the signing. Please make sure the assigned key has a private key associated with it.
Set Detached parameter to false to create an enveloped/enveloping signature. This maynot be supported by certain algorithms or encryption modes.
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.)
SignFinal Method (Crypto Class)
Finalizes the multi-step signing operation.
Syntax
ANSI (Cross Platform) char* SignFinal(int *lpSize = NULL); Unicode (Windows) LPSTR SignFinal(LPINT lpSize = NULL);
char* pkiproxy_crypto_signfinal(void* lpObjint *lpSize);
QByteArray SignFinal();
Remarks
Use this method to finalize the multi-block signing.
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.
SignInit Method (Crypto Class)
Initializes a per-block signing process.
Syntax
ANSI (Cross Platform) int SignInit(int bDetached); Unicode (Windows) INT SignInit(BOOL bDetached);
int pkiproxy_crypto_signinit(void* lpObj, int bDetached);
int SignInit(bool bDetached);
Remarks
Use this method to start a block-by-block signing process.
Specify the signing key in CryptoKey property before starting the signing.
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.)
SignUpdate Method (Crypto Class)
Sends the next block of data for signing.
Syntax
ANSI (Cross Platform) char* SignUpdate(const char* lpBuffer, int lenBuffer, int *lpSize = NULL); Unicode (Windows) LPSTR SignUpdate(LPCSTR lpBuffer, INT lenBuffer, LPINT lpSize = NULL);
char* pkiproxy_crypto_signupdate(void* lpObj, const char* lpBuffer, int lenBuffer, int *lpSize);
QByteArray SignUpdate(QByteArray qbaBuffer);
Remarks
TBD
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.
Verify Method (Crypto Class)
Verifies an enveloped or enveloping signature contained in a buffer.
Syntax
ANSI (Cross Platform) char* Verify(const char* lpBuffer, int lenBuffer, int *lpSize = NULL); Unicode (Windows) LPSTR Verify(LPCSTR lpBuffer, INT lenBuffer, LPINT lpSize = NULL);
char* pkiproxy_crypto_verify(void* lpObj, const char* lpBuffer, int lenBuffer, int *lpSize);
QByteArray Verify(QByteArray qbaBuffer);
Remarks
Use this method to verify an enveloped or enveloping signature contained in a byte array.The method verifies the signature and extracts the original signed content intoanother byte array.
The validation result is stored in SignatureValidationResult property.
Use VerifyDetached to verify detached signatures.
Specify the verification key in the CryptoKey property before commencing verification.
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.
VerifyDetached Method (Crypto Class)
Verifies a detached signature.
Syntax
ANSI (Cross Platform) int VerifyDetached(const char* lpSignedData, int lenSignedData, const char* lpSignature, int lenSignature); Unicode (Windows) INT VerifyDetached(LPCSTR lpSignedData, INT lenSignedData, LPCSTR lpSignature, INT lenSignature);
int pkiproxy_crypto_verifydetached(void* lpObj, const char* lpSignedData, int lenSignedData, const char* lpSignature, int lenSignature);
int VerifyDetached(QByteArray qbaSignedData, QByteArray qbaSignature);
Remarks
Use this method to verify a detached signature. Pass the original message via the SignedData parameter, and the signature via the Signature parameter.
The validation result is stored in SignatureValidationResult property.
Provide the verification key in CryptoKey property before commencing verification.
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.)
VerifyDetachedFile Method (Crypto Class)
Verifies a detached signature.
Syntax
ANSI (Cross Platform) int VerifyDetachedFile(const char* lpszSignedDataFile, const char* lpszSignatureFile); Unicode (Windows) INT VerifyDetachedFile(LPCWSTR lpszSignedDataFile, LPCWSTR lpszSignatureFile);
int pkiproxy_crypto_verifydetachedfile(void* lpObj, const char* lpszSignedDataFile, const char* lpszSignatureFile);
int VerifyDetachedFile(const QString& qsSignedDataFile, const QString& qsSignatureFile);
Remarks
Use this method to verify a detached signature. Pass the original data via the SignedDataFile parameter, and the signature via the SignatureFileparameter.
The validation result is stored in SignatureValidationResult property.
Provide the verification key in CryptoKey property.
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.)
VerifyDetachedFinal Method (Crypto Class)
Finalizes the multi-step detached verification operation.
Syntax
ANSI (Cross Platform) int VerifyDetachedFinal(); Unicode (Windows) INT VerifyDetachedFinal();
int pkiproxy_crypto_verifydetachedfinal(void* lpObj);
int VerifyDetachedFinal();
Remarks
Use this method to finalize the multi-block verification.
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.)
VerifyDetachedInit Method (Crypto Class)
Initiates multi-step verification of a detached signature.
Syntax
ANSI (Cross Platform) int VerifyDetachedInit(const char* lpSignature, int lenSignature); Unicode (Windows) INT VerifyDetachedInit(LPCSTR lpSignature, INT lenSignature);
int pkiproxy_crypto_verifydetachedinit(void* lpObj, const char* lpSignature, int lenSignature);
int VerifyDetachedInit(QByteArray qbaSignature);
Remarks
TBD
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.)
VerifyDetachedUpdate Method (Crypto Class)
Sends a data block for detached signature verification.
Syntax
ANSI (Cross Platform) int VerifyDetachedUpdate(const char* lpSignedDataBlock, int lenSignedDataBlock); Unicode (Windows) INT VerifyDetachedUpdate(LPCSTR lpSignedDataBlock, INT lenSignedDataBlock);
int pkiproxy_crypto_verifydetachedupdate(void* lpObj, const char* lpSignedDataBlock, int lenSignedDataBlock);
int VerifyDetachedUpdate(QByteArray qbaSignedDataBlock);
Remarks
TBD
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.)
VerifyFile Method (Crypto Class)
Verifies an enveloped or enveloping signature contained in a file.
Syntax
ANSI (Cross Platform) int VerifyFile(const char* lpszSourceFile, const char* lpszDestFile); Unicode (Windows) INT VerifyFile(LPCWSTR lpszSourceFile, LPCWSTR lpszDestFile);
int pkiproxy_crypto_verifyfile(void* lpObj, const char* lpszSourceFile, const char* lpszDestFile);
int VerifyFile(const QString& qsSourceFile, const QString& qsDestFile);
Remarks
Use this method to verify an enveloped or enveloping signature and extract the original signed message to another file.
The validation result is stored in SignatureValidationResult property.
Specify the public verification key in CryptoKey property before commencing the validation.
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.)
VerifyFinal Method (Crypto Class)
Finalizes the multi-step verification operation.
Syntax
ANSI (Cross Platform) char* VerifyFinal(int *lpSize = NULL); Unicode (Windows) LPSTR VerifyFinal(LPINT lpSize = NULL);
char* pkiproxy_crypto_verifyfinal(void* lpObjint *lpSize);
QByteArray VerifyFinal();
Remarks
Use this method to finalize the multi-block verification.
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.
VerifyInit Method (Crypto Class)
Initializes a per-block verification process.
Syntax
ANSI (Cross Platform) int VerifyInit(); Unicode (Windows) INT VerifyInit();
int pkiproxy_crypto_verifyinit(void* lpObj);
int VerifyInit();
Remarks
Use this method to start a block-by-block verification process.
Specify the signing key in CryptoKey property before starting the signing.
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.)
VerifyUpdate Method (Crypto Class)
Sends the next block of data for verification.
Syntax
ANSI (Cross Platform) char* VerifyUpdate(const char* lpBuffer, int lenBuffer, int *lpSize = NULL); Unicode (Windows) LPSTR VerifyUpdate(LPCSTR lpBuffer, INT lenBuffer, LPINT lpSize = NULL);
char* pkiproxy_crypto_verifyupdate(void* lpObj, const char* lpBuffer, int lenBuffer, int *lpSize);
QByteArray VerifyUpdate(QByteArray qbaBuffer);
Remarks
TBD
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.
AttestationRecord Event (Crypto Class)
Passes an attestation record to the user code.
Syntax
ANSI (Cross Platform) virtual int FireAttestationRecord(CryptoAttestationRecordEventParams *e);
typedef struct {
const char *Operation;
const char *OpId;
const char *AttRec; int reserved; } CryptoAttestationRecordEventParams;
Unicode (Windows) virtual INT FireAttestationRecord(CryptoAttestationRecordEventParams *e);
typedef struct {
LPCWSTR Operation;
LPCWSTR OpId;
LPCWSTR AttRec; INT reserved; } CryptoAttestationRecordEventParams;
#define EID_CRYPTO_ATTESTATIONRECORD 1 virtual INT PKIPROXY_CALL FireAttestationRecord(LPSTR &lpszOperation, LPSTR &lpszOpId, LPSTR &lpszAttRec);
class CryptoAttestationRecordEventParams { public: const QString &Operation(); const QString &OpId(); const QString &AttRec(); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void AttestationRecord(CryptoAttestationRecordEventParams *e);
// Or, subclass Crypto and override this emitter function. virtual int FireAttestationRecord(CryptoAttestationRecordEventParams *e) {...}
Remarks
This event can fire repeatedly during the operation to pass any attestation records to the component user.
The data returned via this event can be saved and used as evidence of the operation performed.
ClientAuth Event (Crypto Class)
Notifies the application that the service requested an authentication credential from the client.
Syntax
ANSI (Cross Platform) virtual int FireClientAuth(CryptoClientAuthEventParams *e);
typedef struct {
const char *Operation;
const char *OpId;
const char *AuthTypes;
int Accept; int reserved; } CryptoClientAuthEventParams;
Unicode (Windows) virtual INT FireClientAuth(CryptoClientAuthEventParams *e);
typedef struct {
LPCWSTR Operation;
LPCWSTR OpId;
LPCWSTR AuthTypes;
BOOL Accept; INT reserved; } CryptoClientAuthEventParams;
#define EID_CRYPTO_CLIENTAUTH 2 virtual INT PKIPROXY_CALL FireClientAuth(LPSTR &lpszOperation, LPSTR &lpszOpId, LPSTR &lpszAuthTypes, BOOL &bAccept);
class CryptoClientAuthEventParams { public: const QString &Operation(); const QString &OpId(); const QString &AuthTypes(); bool Accept(); void SetAccept(bool bAccept); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void ClientAuth(CryptoClientAuthEventParams *e);
// Or, subclass Crypto and override this emitter function. virtual int FireClientAuth(CryptoClientAuthEventParams *e) {...}
Remarks
AuthTypes contain a list of supported/suggested authentication methods. Use the CryptoChannel object to adjust authentication parameters.
This event can fire repeatedly during an operation, reflecting multi-factor authentication stages.
ClientAuthFailed Event (Crypto Class)
Notifies the application about the failure of attempted authentication type.
Syntax
ANSI (Cross Platform) virtual int FireClientAuthFailed(CryptoClientAuthFailedEventParams *e);
typedef struct {
const char *Operation;
const char *OpId;
const char *AuthType;
int Retry; int reserved; } CryptoClientAuthFailedEventParams;
Unicode (Windows) virtual INT FireClientAuthFailed(CryptoClientAuthFailedEventParams *e);
typedef struct {
LPCWSTR Operation;
LPCWSTR OpId;
LPCWSTR AuthType;
BOOL Retry; INT reserved; } CryptoClientAuthFailedEventParams;
#define EID_CRYPTO_CLIENTAUTHFAILED 3 virtual INT PKIPROXY_CALL FireClientAuthFailed(LPSTR &lpszOperation, LPSTR &lpszOpId, LPSTR &lpszAuthType, BOOL &bRetry);
class CryptoClientAuthFailedEventParams { public: const QString &Operation(); const QString &OpId(); const QString &AuthType(); bool Retry(); void SetRetry(bool bRetry); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void ClientAuthFailed(CryptoClientAuthFailedEventParams *e);
// Or, subclass Crypto and override this emitter function. virtual int FireClientAuthFailed(CryptoClientAuthFailedEventParams *e) {...}
Remarks
AuthType contain the authentication method that failed.
Set Retry to true to try again (subject to service acceptance).
Error Event (Crypto Class)
Information about errors during data delivery.
Syntax
ANSI (Cross Platform) virtual int FireError(CryptoErrorEventParams *e);
typedef struct {
int ErrorCode;
const char *Description; int reserved; } CryptoErrorEventParams;
Unicode (Windows) virtual INT FireError(CryptoErrorEventParams *e);
typedef struct {
INT ErrorCode;
LPCWSTR Description; INT reserved; } CryptoErrorEventParams;
#define EID_CRYPTO_ERROR 4 virtual INT PKIPROXY_CALL FireError(INT &iErrorCode, LPSTR &lpszDescription);
class CryptoErrorEventParams { public: int ErrorCode(); const QString &Description(); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void Error(CryptoErrorEventParams *e);
// Or, subclass Crypto and override this emitter function. virtual int FireError(CryptoErrorEventParams *e) {...}
Remarks
The Error event is fired in case of exceptional conditions during message processing.
ErrorCode contains an error code and Description contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.
Notification Event (Crypto Class)
This event notifies the application about an underlying control flow event.
Syntax
ANSI (Cross Platform) virtual int FireNotification(CryptoNotificationEventParams *e);
typedef struct {
const char *EventID;
const char *EventParam; int reserved; } CryptoNotificationEventParams;
Unicode (Windows) virtual INT FireNotification(CryptoNotificationEventParams *e);
typedef struct {
LPCWSTR EventID;
LPCWSTR EventParam; INT reserved; } CryptoNotificationEventParams;
#define EID_CRYPTO_NOTIFICATION 5 virtual INT PKIPROXY_CALL FireNotification(LPSTR &lpszEventID, LPSTR &lpszEventParam);
class CryptoNotificationEventParams { 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(CryptoNotificationEventParams *e);
// Or, subclass Crypto and override this emitter function. virtual int FireNotification(CryptoNotificationEventParams *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.
OperationFinish Event (Crypto Class)
Reports the completion of data processing operation.
Syntax
ANSI (Cross Platform) virtual int FireOperationFinish(CryptoOperationFinishEventParams *e);
typedef struct {
const char *Operation;
const char *OpId; int reserved; } CryptoOperationFinishEventParams;
Unicode (Windows) virtual INT FireOperationFinish(CryptoOperationFinishEventParams *e);
typedef struct {
LPCWSTR Operation;
LPCWSTR OpId; INT reserved; } CryptoOperationFinishEventParams;
#define EID_CRYPTO_OPERATIONFINISH 6 virtual INT PKIPROXY_CALL FireOperationFinish(LPSTR &lpszOperation, LPSTR &lpszOpId);
class CryptoOperationFinishEventParams { public: const QString &Operation(); const QString &OpId(); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void OperationFinish(CryptoOperationFinishEventParams *e);
// Or, subclass Crypto and override this emitter function. virtual int FireOperationFinish(CryptoOperationFinishEventParams *e) {...}
Remarks
This event fires when the cryptographic operation has completed.
OperationStart Event (Crypto Class)
Reports the start of data processing operation.
Syntax
ANSI (Cross Platform) virtual int FireOperationStart(CryptoOperationStartEventParams *e);
typedef struct {
const char *Operation;
const char *OpId;
int Cancel; int reserved; } CryptoOperationStartEventParams;
Unicode (Windows) virtual INT FireOperationStart(CryptoOperationStartEventParams *e);
typedef struct {
LPCWSTR Operation;
LPCWSTR OpId;
BOOL Cancel; INT reserved; } CryptoOperationStartEventParams;
#define EID_CRYPTO_OPERATIONSTART 7 virtual INT PKIPROXY_CALL FireOperationStart(LPSTR &lpszOperation, LPSTR &lpszOpId, BOOL &bCancel);
class CryptoOperationStartEventParams { public: const QString &Operation(); const QString &OpId(); bool Cancel(); void SetCancel(bool bCancel); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void OperationStart(CryptoOperationStartEventParams *e);
// Or, subclass Crypto and override this emitter function. virtual int FireOperationStart(CryptoOperationStartEventParams *e) {...}
Remarks
This event fires when the cryptographic operation is about to start.
Use the Cancel parameter to cancel the operation.
Progress Event (Crypto Class)
Reports the data encryption/decryption progress.
Syntax
ANSI (Cross Platform) virtual int FireProgress(CryptoProgressEventParams *e);
typedef struct {
const char *Operation;
const char *OpId;
int64 Total;
int64 Current;
int Cancel; int reserved; } CryptoProgressEventParams;
Unicode (Windows) virtual INT FireProgress(CryptoProgressEventParams *e);
typedef struct {
LPCWSTR Operation;
LPCWSTR OpId;
LONG64 Total;
LONG64 Current;
BOOL Cancel; INT reserved; } CryptoProgressEventParams;
#define EID_CRYPTO_PROGRESS 8 virtual INT PKIPROXY_CALL FireProgress(LPSTR &lpszOperation, LPSTR &lpszOpId, LONG64 &lTotal, LONG64 &lCurrent, BOOL &bCancel);
class CryptoProgressEventParams { public: const QString &Operation(); const QString &OpId(); qint64 Total(); qint64 Current(); bool Cancel(); void SetCancel(bool bCancel); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void Progress(CryptoProgressEventParams *e);
// Or, subclass Crypto and override this emitter function. virtual int FireProgress(CryptoProgressEventParams *e) {...}
Remarks
This event fires periodically during a file encrypt/decrypt operation to report its progress.
Use the Cancel parameter to terminate the encryption/decryption if needed.
ServiceAuth Event (Crypto Class)
Notifies about the start of service authentication.
Syntax
ANSI (Cross Platform) virtual int FireServiceAuth(CryptoServiceAuthEventParams *e);
typedef struct {
const char *Operation;
const char *OpId;
const char *AuthType;
const char *AuthID;
const char *AuthToken;
int Accept; int reserved; } CryptoServiceAuthEventParams;
Unicode (Windows) virtual INT FireServiceAuth(CryptoServiceAuthEventParams *e);
typedef struct {
LPCWSTR Operation;
LPCWSTR OpId;
LPCWSTR AuthType;
LPCWSTR AuthID;
LPCWSTR AuthToken;
BOOL Accept; INT reserved; } CryptoServiceAuthEventParams;
#define EID_CRYPTO_SERVICEAUTH 9 virtual INT PKIPROXY_CALL FireServiceAuth(LPSTR &lpszOperation, LPSTR &lpszOpId, LPSTR &lpszAuthType, LPSTR &lpszAuthID, LPSTR &lpszAuthToken, BOOL &bAccept);
class CryptoServiceAuthEventParams { public: const QString &Operation(); const QString &OpId(); const QString &AuthType(); const QString &AuthID(); const QString &AuthToken(); bool Accept(); void SetAccept(bool bAccept); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void ServiceAuth(CryptoServiceAuthEventParams *e);
// Or, subclass Crypto and override this emitter function. virtual int FireServiceAuth(CryptoServiceAuthEventParams *e) {...}
Remarks
Subscribe to this event to respond to service authentication and validate credentials as required.
This event can fire repeatedly during an operation, reflecting multi-factor authentication stages.
ServiceAuthFailed Event (Crypto Class)
Notifies about the failure of service authentication attempt.
Syntax
ANSI (Cross Platform) virtual int FireServiceAuthFailed(CryptoServiceAuthFailedEventParams *e);
typedef struct {
const char *Operation;
const char *OpId;
const char *AuthType;
const char *AuthID; int reserved; } CryptoServiceAuthFailedEventParams;
Unicode (Windows) virtual INT FireServiceAuthFailed(CryptoServiceAuthFailedEventParams *e);
typedef struct {
LPCWSTR Operation;
LPCWSTR OpId;
LPCWSTR AuthType;
LPCWSTR AuthID; INT reserved; } CryptoServiceAuthFailedEventParams;
#define EID_CRYPTO_SERVICEAUTHFAILED 10 virtual INT PKIPROXY_CALL FireServiceAuthFailed(LPSTR &lpszOperation, LPSTR &lpszOpId, LPSTR &lpszAuthType, LPSTR &lpszAuthID);
class CryptoServiceAuthFailedEventParams { public: const QString &Operation(); const QString &OpId(); const QString &AuthType(); const QString &AuthID(); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void ServiceAuthFailed(CryptoServiceAuthFailedEventParams *e);
// Or, subclass Crypto and override this emitter function. virtual int FireServiceAuthFailed(CryptoServiceAuthFailedEventParams *e) {...}
Remarks
Subscribe to this event to track service authentication failures.
Config Settings (Crypto 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.Crypto Config Settings
Trappable Errors (Crypto 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.
Crypto Errors
2 error message (2) |