IPWorks OpenPGP 2020 C++ Edition

Questions / Feedback?

CreateKey Method

Creates an OpenPGP key pair.

Syntax

ANSI (Cross Platform)
int CreateKey(const char* lpszUserId, const char* lpszPassphrase);

Unicode (Windows)
INT CreateKey(LPCWSTR lpszUserId, LPCWSTR lpszPassphrase);
- (void)createKey:(NSString*)userId :(NSString*)passphrase;
#define MID_KEYMGR_CREATEKEY 7

IPWORKSOPENPGP_EXTERNAL int IPWORKSOPENPGP_CALL IPWorksOpenPGP_KeyMgr_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

This method creates a new OpenPGP key pair. The UserId parameter specifies the user Id of the key.

The UserId format is:

FirstName LastName (Comment) <Email>
Not all values are required when selecting or generating a key, but at least FirstName or Email are required.

Additional configuration settings may be set to further configure the details of the key being created. Please see the following settings for details:

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.)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks OpenPGP 2020 C++ Edition - Version 20.0 [Build 8249]