IPWorks OpenPGP 2020 C++ Edition

Questions / Feedback?

KeyPassphrase Event

Fired if the passphrase of current key is incorrect or empty.

Syntax

ANSI (Cross Platform)
virtual int FireKeyPassphrase(PHTMLMailerKeyPassphraseEventParams *e);
typedef struct {
const char *UserId;
const char *KeyId;
char *Passphrase; int reserved; } PHTMLMailerKeyPassphraseEventParams; Unicode (Windows) virtual INT FireKeyPassphrase(PHTMLMailerKeyPassphraseEventParams *e);
typedef struct {
LPCWSTR UserId;
LPCWSTR KeyId;
LPWSTR Passphrase; INT reserved; } PHTMLMailerKeyPassphraseEventParams;
- (void)onKeyPassphrase:(NSString*)userId :(NSString*)keyId :(NSString**)passphrase;
#define EID_PHTMLMAILER_KEYPASSPHRASE 4

virtual INT IPWORKSOPENPGP_CALL FireKeyPassphrase(LPSTR &lpszUserId, LPSTR &lpszKeyId, LPSTR &lpszPassphrase);

Remarks

This event fires when the passphrase for the key is required. The passphrase must be specified before operations requiring the secret key are attempted. The passphrase may be supplied by setting the Passphrase parameter in this event, or by specifying the KeyPassphrase property before attempting the operation.

The passphrase is required when using the following methods in KeyMgr:

  • AddUserId
  • SignUserId
  • ChangeExpirationDate
  • ChangePassphrase

When using the OpenPGP class, or an email-based class, the following methods require a passphrase for the key:

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