⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pgpkeydb.h

📁 著名的加密软件的应用于电子邮件中
💻 H
📖 第 1 页 / 共 2 页
字号:
						char *oldphrase, char *newphrase);

PGPError PGPKDBExport
pgpRemoveSubKey (PGPSubKey *subkey);

PGPError PGPKDBExport
pgpRevokeSubKey (PGPSubKey *subkey, char *passphrase);

PGPError PGPKDBExport
pgpRemoveUserID (PGPUserID *userID);

PGPError PGPKDBExport
pgpAddUserID (PGPKey *key, char *name, int nameLen, char *passphrase);

PGPError PGPKDBExport
pgpSetPrimaryUserID (PGPUserID *userid);

PGPError PGPKDBExport
pgpCertifyUserID (PGPUserID *userID, PGPKey *certifying_key, char *passphrase);

PGPError PGPKDBExport
pgpGetCertifier (PGPCert *cert, PGPKeySet *allkeys, PGPKey **certkey);

PGPError PGPKDBExport
pgpRevokeCert (PGPCert *cert, PGPKeySet *allkeys, char *passphrase);

PGPError PGPKDBExport
pgpRemoveCert (PGPCert *cert);

PGPError PGPKDBExport
pgpGetMessageRecoveryKey (PGPKey *basekey, PGPKeySet *allkeys, unsigned nth,
	PGPKey **mrkey, byte *mrclass, unsigned *numbermrks);

/* New trust model */
PGPError PGPKDBExport
pgpSetUserIDConf (PGPUserID *userID, unsigned long confidence);		

/*
 * Trust values for pgpSetKeyTrust and kPGPKeyPropTrust property:
 *
 * PGP_KEYTRUST_UNDEFINED (do not pass to pgpSetKeyTrust)
 * PGP_KEYTRUST_UNKNOWN	 (unknown)
 * PGP_KEYTRUST_NEVER		 (never)
 * PGP_KEYTRUST_MARGINAL	(sometimes)
 * PGP_KEYTRUST_COMPLETE	(always)
 * PGP_KEYTRUST_ULTIMATE (do not pass to pgpSetKeyTrust)
 */

PGPError PGPKDBExport
pgpSetKeyTrust (PGPKey *key, unsigned char trust);	/* old trust model */

PGPError PGPKDBExport
pgpSetKeyAxiomatic (PGPKey *key, Boolean checkPassphrase, char *passphrase);

PGPError PGPKDBExport
pgpUnsetKeyAxiomatic (PGPKey *key);

/* Get property functions */

PGPError PGPKDBExport
pgpGetKeyBoolean (PGPKey *key, PGPKeyPropName propname, Boolean *prop);

PGPError PGPKDBExport
pgpGetKeyNumber (PGPKey *key, PGPKeyPropName propname, long *prop);

PGPError PGPKDBExport
pgpGetKeyString (PGPKey *key, PGPKeyPropName propname, char *prop,
				size_t *len);

PGPError PGPKDBExport
pgpGetKeyTime (PGPKey *key, PGPKeyPropName propname, PGPTime *prop);

PGPError PGPKDBExport
pgpGetSubKeyBoolean (PGPSubKey *subkey, PGPKeyPropName propname,
				Boolean *prop);

PGPError PGPKDBExport
pgpGetSubKeyNumber (PGPSubKey *subkey, PGPKeyPropName propname, long *prop);

PGPError PGPKDBExport
pgpGetSubKeyString (PGPSubKey *subkey, PGPKeyPropName propname, char *prop,
				size_t *len);

PGPError PGPKDBExport
pgpGetSubKeyTime (PGPSubKey *subkey, PGPKeyPropName propname, PGPTime *prop);

PGPError PGPKDBExport
pgpGetUserIDBoolean (PGPUserID *userID, PGPUserIDPropName propname,
					Boolean *prop);

PGPError PGPKDBExport
pgpGetUserIDNumber (PGPUserID *userID, PGPUserIDPropName propname, long *prop);

PGPError PGPKDBExport
pgpGetUserIDString (PGPUserID *userID, PGPUserIDPropName propname,
					char *prop, size_t *len);

PGPError PGPKDBExport
pgpGetCertBoolean (PGPCert *cert, PGPCertPropName propname, Boolean *prop);

PGPError PGPKDBExport
pgpGetCertNumber (PGPCert *cert, PGPCertPropName propname, long *prop);

PGPError PGPKDBExport
pgpGetCertString (PGPCert *cert, PGPCertPropName propname, char *prop,
				size_t *len);

PGPError PGPKDBExport
pgpGetCertTime (PGPCert *cert, PGPCertPropName propname, PGPTime *prop);

PGPError PGPKDBExport
pgpGetHashAlgUsed (PGPKey *key, long *hashAlg);


/* Convenience property functions */

PGPUserID PGPKDBExport *
pgpGetPrimaryUserID(PGPKey *key);

PGPError PGPKDBExport
pgpGetPrimaryUserIDName(PGPKey *key, char *buf, size_t *len);

PGPError PGPKDBExport
pgpGetPrimaryUserIDValidity(PGPKey *key, long *validity);


int PGPKDBExport
pgpCompareKeys(PGPKey *a, PGPKey *b, PGPKeyOrdering order);

int PGPKDBExport
pgpUserIDStrCompare(char const *a, char const *b);

PGPKeyList PGPKDBExport *
pgpOrderKeySet (PGPKeySet *src, PGPKeyOrdering order);

void PGPKDBExport
pgpIncKeyListRefCount (PGPKeyList *keys);

void PGPKDBExport
pgpFreeKeyList (PGPKeyList *keys);


/* Key iteration functions */

void PGPKDBExport
pgpIncSubKeyRefCount (PGPSubKey *subkey);

void PGPKDBExport
pgpIncUserIDRefCount (PGPUserID *userid);

void PGPKDBExport
pgpIncCertRefCount (PGPCert *cert);

void PGPKDBExport
pgpFreeSubKey (PGPSubKey *subkey);

void PGPKDBExport
pgpFreeUserID (PGPUserID *userid);

void PGPKDBExport
pgpFreeCert (PGPCert *cert);

PGPKeyIter PGPKDBExport *
pgpNewKeyIter (PGPKeyList *keys);

PGPKeyIter PGPKDBExport *
pgpCopyKeyIter (PGPKeyIter *orig);

void PGPKDBExport
pgpFreeKeyIter (PGPKeyIter *iter);

long PGPKDBExport
pgpKeyIterIndex (PGPKeyIter *iter);

void PGPKDBExport
pgpKeyIterRewind (PGPKeyIter *iter);

long PGPKDBExport
pgpKeyIterSet (PGPKeyIter *iter, PGPKey *key);

PGPKey PGPKDBExport *
pgpKeyIterMove (PGPKeyIter *iter, long relOffset);

PGPKey PGPKDBExport *
pgpKeyIterNext (PGPKeyIter *iter);

PGPKey PGPKDBExport *
pgpKeyIterPrev (PGPKeyIter *iter);

PGPKey PGPKDBExport *
pgpKeyIterKey (PGPKeyIter *iter);

PGPSubKey PGPKDBExport *
pgpKeyIterSubKey (PGPKeyIter *iter);

PGPUserID PGPKDBExport *
pgpKeyIterUserID (PGPKeyIter *iter);

PGPCert PGPKDBExport *
pgpKeyIterCert (PGPKeyIter *iter);

Boolean PGPKDBExport
pgpKeyIterValid (PGPKeyIter *iter);

PGPSubKey PGPKDBExport *
pgpKeyIterNextSubKey (PGPKeyIter *iter);

PGPSubKey PGPKDBExport *
pgpKeyIterPrevSubKey (PGPKeyIter *iter);

void PGPKDBExport
pgpKeyIterRewindSubKey (PGPKeyIter *iter);

PGPUserID PGPKDBExport *
pgpKeyIterNextUserID (PGPKeyIter *iter);

PGPUserID PGPKDBExport *
pgpKeyIterPrevUserID (PGPKeyIter *iter);

void PGPKDBExport
pgpKeyIterRewindUserID (PGPKeyIter *iter);

PGPCert PGPKDBExport *
pgpKeyIterNextUIDCert (PGPKeyIter *iter);

PGPCert PGPKDBExport *
pgpKeyIterPrevUIDCert (PGPKeyIter *iter);

void PGPKDBExport
pgpKeyIterRewindUIDCert (PGPKeyIter *iter);


/* Preference file access */

PGPError PGPKDBExport
pgpGetPrefNumber (PGPPrefNameNumber prefName, long *value);

PGPError PGPKDBExport
pgpGetPrefString (PGPPrefNameString prefName, char *buffer, size_t *length);

char PGPKDBExport *
pgpGetPrefCStringCopy (PGPPrefNameString prefName);

PGPError PGPKDBExport
pgpGetPrefBoolean (PGPPrefNameBoolean prefName, Boolean *value);

PGPError PGPKDBExport
pgpGetPrefData (PGPPrefNameData prefName, void *buffer, size_t *length);

void PGPKDBExport *
pgpGetPrefDataCopy (PGPPrefNameData prefName, size_t *len);

PGPFileRef PGPKDBExport *
pgpGetPrefFileRef (PGPPrefNameData prefName);

PGPError PGPKDBExport
pgpSetPrefNumber (PGPPrefNameNumber prefName, long value);

PGPError PGPKDBExport
pgpSetPrefString (PGPPrefNameString prefName, char const *buffer,
					size_t length);

PGPError PGPKDBExport
pgpSetPrefCString (PGPPrefNameString prefName, char const *string);

PGPError PGPKDBExport
pgpSetPrefBoolean (PGPPrefNameBoolean prefName, Boolean value);

PGPError PGPKDBExport
pgpSetPrefData (PGPPrefNameData prefName, void const *buffer, size_t length);

PGPError PGPKDBExport
pgpSetPrefFileRef (PGPPrefNameData prefName, PGPFileRef const *fileRef);


/* Get/set default private key */

PGPKey PGPKDBExport *
pgpGetDefaultPrivateKey (PGPKeySet *keyset);

PGPError PGPKDBExport
pgpSetDefaultPrivateKey (PGPKey *key);

PgpTrustModel PGPKDBExport
pgpGetTrustModel (void);		/* always returns PGPTRUST0 in this release */


/* Get/set user value */

PGPError PGPKDBExport
pgpSetKeyUserVal (PGPKey *key, long userVal);

PGPError PGPKDBExport
pgpSetUserIDUserVal (PGPUserID *userid, long userVal);

PGPError PGPKDBExport
pgpSetSubKeyUserVal (PGPSubKey *subkey, long userVal);

PGPError PGPKDBExport
pgpSetCertUserVal (PGPCert *cert, long userVal);

PGPError PGPKDBExport
pgpGetKeyUserVal (PGPKey *key, long *userVal);

PGPError PGPKDBExport
pgpGetUserIDUserVal (PGPUserID *userid, long *userVal);

PGPError PGPKDBExport
pgpGetSubKeyUserVal (PGPSubKey *subkey, long *userVal);

PGPError PGPKDBExport
pgpGetCertUserVal (PGPCert *cert, long *userVal);



/* Preference functions */

PGPError PGPKDBExport
pgpLoadPrefs (void);

PGPError PGPKDBExport
pgpSavePrefs (void);

PGPError PGPKDBExport
pgpSetDefaultKeyPath (void);

/*
 * Don't use this. It's only for use by the Simple PGP library,
 * and will be going away.
 */
PGPError PGPKDBExport
pgpGetKeyRingFileRefs (PGPFileRef **pubRef, PGPFileRef **privRef);

/*
 * Debugging support
 */
#define pgpaPGPKeyDBValid(db)		 		 		 		 		 		 \
			pgpaCall(pgpaInternalPGPKeyDBValid, (pgpaCallPrefix, db, #db))
#define pgpaPGPKeySetValid(set)												\
			pgpaCall(pgpaInternalPGPKeySetValid, (pgpaCallPrefix, set, #set))
#define pgpaPGPKeyListValid(list)		 		 		 		 		 	\
			pgpaCall(pgpaInternalPGPKeyListValid,	 		 		 		 \
					(pgpaCallPrefix, list, #list))
#define pgpaPGPKeyIterValid(iter)		 		 		 		 		 	\
			pgpaCall(pgpaInternalPGPKeyIterValid,	 		 		 		 \
					(pgpaCallPrefix, iter, #iter))
#define pgpaPGPKeyValid(key)												\
			pgpaCall(pgpaInternalPGPKeyValid, (pgpaCallPrefix, key, #key))
#define pgpaPGPSubKeyValid(subKey)											\
			pgpaCall(pgpaInternalPGPSubKeyValid,							\
				(pgpaCallPrefix, subKey, #subKey))
#define pgpaPGPUserIDValid(userID)											\
			pgpaCall(pgpaInternalPGPUserIDValid,							\
				(pgpaCallPrefix, userID, #userID))
#define pgpaPGPCertValid(cert)												\
			pgpaCall(pgpaInternalPGPCertValid, (pgpaCallPrefix, cert, #cert))

#if DEBUG	/* [ */

Boolean	PGPKDBExport	pgpaInternalPGPKeyDBValid(pgpaCallPrefixDef,
							PGPKeyDB const *keyDB, char const *varName);
Boolean	PGPKDBExport	pgpaInternalPGPKeySetValid(pgpaCallPrefixDef,
							PGPKeySet const *keySet, char const *varName);
Boolean	PGPKDBExport	pgpaInternalPGPKeyListValid(pgpaCallPrefixDef,
							PGPKeyList const *keyList, char const *varName);
Boolean	PGPKDBExport	pgpaInternalPGPKeyIterValid(pgpaCallPrefixDef,
							PGPKeyIter const *keyIter, char const *varName);
Boolean	PGPKDBExport	pgpaInternalPGPKeyValid(pgpaCallPrefixDef,
							PGPKey const *key, char const *varName);
Boolean	PGPKDBExport	pgpaInternalPGPSubKeyValid(pgpaCallPrefixDef,
							PGPSubKey const *subKey, char const *varName);
Boolean	PGPKDBExport	pgpaInternalPGPUserIDValid(pgpaCallPrefixDef,
							PGPUserID const *userID, char const *varName);
Boolean	PGPKDBExport	pgpaInternalPGPCertValid(pgpaCallPrefixDef,
							PGPCert const *cert, char const *varName);

#endif /* ] DEBUG */

#ifdef __cplusplus
}
#endif

#if PRAGMA_IMPORT_SUPPORTED
#pragma import reset
#endif

#endif /* PGPKEYDB_H */


/*
 * Local Variables:
 * tab-width: 4
 * End:
 * vi: ts=4 sw=4
 * vim: si
 */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -