Verify Method

Verifies a digital signature using a key.

Syntax

ANSI (Cross Platform)
int Verify(const char* lpszKeyName, const char* lpszVersionId, int bIsDigest);

Unicode (Windows)
INT Verify(LPCWSTR lpszKeyName, LPCWSTR lpszVersionId, BOOL bIsDigest);
- (BOOL)verify:(NSString*)keyName :(NSString*)versionId :(BOOL)isDigest;
#define MID_GOOGLEKMS_VERIFY 28

CLOUDKEYS_EXTERNAL int CLOUDKEYS_CALL CloudKeys_GoogleKMS_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

This method verifies a digital signature using the asymmetric key version specified by KeyName and VersionId. If the signature is successfully verified, this method return true, otherwise it returns false.

The message data is taken from the input stream supplied via the SetInputStream method, the specified InputFile, or the InputData property. The digital signature data is taken from the specified OutputFile or the OutputData property.

The IsDigest parameter specifies whether the message data is the original message (false) or a message digest (true). When a message digest is supplied, keep in mind that it must be the exact same digest that was used at signing time, regardless of whether it has been recomputed.

Google does not support server-side signature verification, so this method will call GetPublicKey internally and then use the public key to verify the digital signature locally. This functionality is offered as a convenience.

Error Handling (C++)

This method returns a Boolean 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.

Copyright (c) 2022 /n software inc. - All rights reserved.
Cloud Keys 2020 C++ Edition - Version 20.0 [Build 8157]