IPWorks OpenPGP 2020 C++ Edition

Questions / Feedback?

KeyPassphrase Property

The passphrase for the key's secret key (if any).

Syntax

ANSI (Cross Platform)
char* GetKeyPassphrase(int iKeyIndex);
int SetKeyPassphrase(int iKeyIndex, const char* lpszKeyPassphrase); Unicode (Windows) LPWSTR GetKeyPassphrase(INT iKeyIndex);
INT SetKeyPassphrase(INT iKeyIndex, LPCWSTR lpszKeyPassphrase);
- (NSString*)keyPassphrase:(int)keyIndex;
- (void)setKeyPassphrase:(int)keyIndex:(NSString*)newKeyPassphrase;
#define PID_PPOP_KEYPASSPHRASE 15

IPWORKSOPENPGP_EXTERNAL void* IPWORKSOPENPGP_CALL IPWorksOpenPGP_PPOP_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
IPWORKSOPENPGP_EXTERNAL int IPWORKSOPENPGP_CALL IPWorksOpenPGP_PPOP_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);
IPWORKSOPENPGP_EXTERNAL int IPWORKSOPENPGP_CALL IPWorksOpenPGP_PPOP_CheckIndex(void *lpObj, int propid, int arridx);

Default Value

""

Remarks

The passphrase for the key's secret key (if any). This must be specified before operations requiring the secret key are attempted. The passphrase may be supplied in this property or through the KeyPassphrase event, which will fire when a passphrase is required.

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:

  • Decrypt
  • Sign
  • SignAndEncrypt

The KeyIndex parameter specifies the index of the item in the array. The size of the array is controlled by the KeyCount property.

This property is not available at design time.

Data Type

String

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