pgpkeys.pas
来自「用DELPHI实现的 PGP 加密算法」· PAS 代码 · 共 1,703 行 · 第 1/5 页
PAS
1,703 行
RelOffset: PGPInt32;
var OutRef: pPGPKey): PGPError; cdecl;
// PGP 6.5.X
PGPKeyIterSeek: function(Iter: pPGPKeyIter;
Key: pPGPKey): PGPInt32; cdecl;
// PGP 7.X
{PGPKeyIterSeek: function(Iter: pPGPKeyIter;
Key: pPGPKeyDBObj): PGPInt32; cdecl;}
// PGP 6.5.X
PGPKeyIterNext: function(Iter: pPGPKeyIter;
var OutRef: pPGPKey): PGPError; cdecl;
// PGP 6.5.X
PGPKeyIterNextSubKey: function(Iter: pPGPKeyIter;
var OutRef: pPGPSubKey): PGPError; cdecl;
// PGP 6.5.X
PGPKeyIterNextUserID: function(Iter: pPGPKeyIter;
var OutRef: pPGPUserID): PGPError; cdecl;
// PGP 6.5.X
PGPKeyIterNextUIDSig: function(Iter: pPGPKeyIter;
var OutRef: pPGPSig): PGPError; cdecl;
// PGP 7.X
PGPKeyIterNextKeyDBObj7: function(Iter: pPGPKeyIter;
ObjectType: PGPKeyDBObjType; var OutRef: pPGPKeyDBObj): PGPError; cdecl;
// PGP 6.5.X
PGPKeyIterPrev: function(Iter: pPGPKeyIter;
var OutRef: pPGPKey): PGPError; cdecl;
// PGP 6.5.X
PGPKeyIterPrevSubKey: function(Iter: pPGPKeyIter;
var OutRef: pPGPSubKey): PGPError; cdecl;
// PGP 6.5.X
PGPKeyIterPrevUserID: function(Iter: pPGPKeyIter;
var OutRef: pPGPUserID): PGPError; cdecl;
// PGP 6.5.X
PGPKeyIterPrevUIDSig: function(Iter: pPGPKeyIter;
var OutRef: pPGPSig): PGPError; cdecl;
// PGP 7.X
PGPKeyIterPrevKeyDBObj7: function(Iter: pPGPKeyIter;
ObjectType: PGPKeyDBObjType; var OutRef: pPGPKeyDBObj): PGPError; cdecl;
// PGP 6.5.X
PGPKeyIterRewind: function(Iter: pPGPKeyIter): PGPError; cdecl;
// PGP 6.5.X
PGPKeyIterRewindSubKey: function(Iter: pPGPKeyIter): PGPError; cdecl;
// PGP 6.5.X
PGPKeyIterRewindUserID: function(Iter: pPGPKeyIter): PGPError; cdecl;
// PGP 6.5.X
PGPKeyIterRewindUIDSig: function(Iter: pPGPKeyIter): PGPError; cdecl;
// PGP 7.X
PGPKeyIterRewindKeyDBObj7: function(Iter: pPGPKeyIter; ObjectType: PGPKeyDBObjType): PGPError; cdecl;
{ Key manipulation functions }
// PGP 6.5.X
PGPGenerateKey: function(Context: pPGPContext;
var Key: pPGPKey;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 7.X
{PGPGenerateKey: function(Context: pPGPContext;
var Key: pPGPKeyDBObj;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;}
// PGP 6.5.X
PGPGenerateSubKey: function(Context: pPGPContext;
var SubKey: pPGPSubKey;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 7.X
{PGPGenerateSubKey: function(Context: pPGPContext;
var SubKey: pPGPKeyDBObj;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;}
// PGP 6.5.X
PGPChangePassphrase6: function(Key: pPGPKey;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 6.5.X
PGPChangeSubKeyPassphrase6: function(SubKey: pPGPSubKey;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 7.X
PGPChangePassphrase7: function(Key: pPGPKeyDBObj;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 6.5.X
PGPEnableKey6: function(Key: pPGPKey): PGPError; cdecl;
// PGP 6.5.X
PGPDisableKey6: function(Key: pPGPKey): PGPError; cdecl;
// PGP 7.X
PGPSetKeyDBObjEnabled7: function(Key: pPGPKeyDBObj; Enable: PGPBoolean): PGPError; cdecl;
// PGP 6.5.X
PGPRevokeKey6: function(Key: pPGPKey;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 6.5.X
PGPRevokeSubKey6: function(SubKey: pPGPSubKey;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 7.X
PGPRevoke7: function(Key: pPGPKeyDBObj;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 6.5.X
PGPSetKeyAxiomatic: function(Key: pPGPKey;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 6.5.X
PGPUnsetKeyAxiomatic: function(Key: pPGPKey): PGPError; cdecl;
// PGP 7.X
PGPSetKeyDBObjAxiomatic: function(Key: pPGPKeyDBObj; SetAxiomatic: PGPBoolean;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 6.5.X
PGPCompareKeys: function(A: pPGPKey; B: pPGPKey;
Order: PGPKeyOrdering): PGPInt32; cdecl;
// PGP 7.X
{PGPCompareKeys: function(A: pPGPKeyDBObj; B: pPGPKeyDBObj;
Order: PGPKeyOrdering): PGPInt32; cdecl;}
// PGP 6.5.X
PGPRemoveSubKey: function(SubKey: pPGPSubKey): PGPError; cdecl;
// PGP 6.5.X
PGPRemoveUserID: function(UserID: pPGPUserID): PGPError; cdecl;
// PGP 6.5.X
PGPRemoveSig: function(Cert: pPGPSig): PGPError; cdecl;
// PGP 7.X
PGPDeleteKeyDBObj: function(KeyDBObj: pPGPKeyDBObj): PGPError; cdecl;
// PGP 6.5.X
PGPAddUserID: function(Key: pPGPKey;
const UserID: PChar;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 7.X
{PGPAddUserID: function(Key: pPGPKeyDBObj;
const UserID: PChar;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;}
// PGP 6.5.X
PGPSetPrimaryUserID6: function(UserID: pPGPUserID): PGPError; cdecl;
// PGP 7.X
PGPSetPrimaryUserID7: function(UserID: pPGPKeyDBObj;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// both
PGPCompareUserIDStrings: function(A: PChar;
B: PChar): PGPInt32; cdecl;
// PGP 6.5.X
PGPSignUserID: function(UserID: pPGPUserID;
CertifyingKey: pPGPKey;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 7.X
{PGPCertifyUserID: function(UserID: pPGPKeyDBObj;
CertifyingKey: pPGPKeyDBObj;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;}
// PGP 6.5.X
PGPRevokeSig6: function(Cert: pPGPSig;
AllKeys: pPGPKeySet;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 7.X
PGPRevokeSig7: function(Cert: pPGPKeyDBObj;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 6.5.X
PGPCountAdditionalRecipientRequests: function(BaseKey: pPGPKey;
var NumARKeys: PGPUInt32): PGPError; cdecl;
// PGP 7.X
{PGPCountAdditionalRecipientRequests: function(BaseKey: pPGPKeyDBObj;
var NumARKeys: PGPUInt32): PGPError; cdecl;}
// PGP 6.5.X
PGPGetIndexedAdditionalRecipientRequestKey6: function(BaseKey: pPGPKey;
AllKeys: pPGPKeySet;
ARKeyIndex: PGPUInt32;
var ARKey: pPGPKey;
var ARKeyID: TPGPKeyID7;
var ARClass: PGPByte): PGPError; cdecl;
// PGP 7.X
PGPGetIndexedAdditionalRecipientRequestKey7: function(BaseKey: pPGPKeyDBObj;
ARKeyIndex: PGPUInt32;
var ARKey: pPGPKeyDBObj;
var ARKeyID: TPGPKeyID7;
var ARClass: PGPByte): PGPError; cdecl;
// PGP 6.5.X
PGPGetSigCertifierKey: function(Cert: pPGPSig;
AllKeys: pPGPKeySet;
var CertKey: pPGPKey): PGPError; cdecl;
// PGP 7.X
{PGPGetSigCertifierKey: function(Cert: pPGPKeyDBObj;
AllKeys: pPGPKeyDBObj;
var CertKey: pPGPKeyDBObj): PGPError; cdecl;}
// PGP 6.5.X
PGPCountRevocationKeys: function(BaseKey: pPGPKey;
var NumRevKeys: PGPUInt32): PGPError; cdecl;
// PGP 7.X
{PGPCountRevocationKeys: function(BaseKey: pPGPKeyDBObj;
var NumRevKeys: PGPUInt32): PGPError; cdecl;}
// PGP 6.5.X
PGPGetIndexedRevocationKey6: function(BaseKey: pPGPKey;
AllKeys: pPGPKeySet;
RevKeyIndex: PGPUInt32;
var RevKey: pPGPKey;
var RevKeyID: TPGPKeyID7): PGPError; cdecl;
// PGP 7.X
PGPGetIndexedRevocationKey7: function(BaseKey: pPGPKeyDBObj;
RevKeyIndex: PGPUInt32;
var RevKey: pPGPKey;
var RevKeyID: TPGPKeyID7): PGPError; cdecl;
{ Entropy/Passkey/Passphrase }
// both
PGPGetKeyEntropyNeeded: function(Context: pPGPContext;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPUInt32; cdecl;
// PGP 6.5.X
PGPGetKeyPasskeyBuffer6: function(Key: pPGPKey;
pPasskeyBuffer: Pointer;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 6.5.X
PGPGetSubKeyPasskeyBuffer6: function(SubKey: pPGPSubKey;
pPasskeyBuffer: Pointer;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 7.X
PGPGetPasskeyBuffer7: function(Key: pPGPKeyDBObj;
pPasskeyBuffer: Pointer;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPError; cdecl;
// PGP 6.5.X
PGPPassphraseIsValid: function(Key: pPGPKey;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPBoolean; cdecl;
// PGP 7.X
{PGPPassphraseIsValid: function(Key: pPGPKeyDBObj;
Options: pPGPOptionList;
LastOption: pPGPOptionList): PGPBoolean; cdecl;}
{ Get property functions 6.5.X}
PGPGetHashAlgUsed: function(Key: pPGPKey;
var HashAlg: PGPHashAlgorithm): PGPError; cdecl;
PGPGetKeyBoolean: function(Key: pPGPKey;
PropName: PGPKeyPropName;
var Prop: PGPBoolean): PGPError; cdecl;
PGPGetKeyNumber: function(Key: pPGPKey;
PropName: PGPKeyPropName;
var Prop: PGPInt32): PGPError; cdecl;
PGPGetKeyPropertyBuffer: function(Key: pPGPKey;
PropName: PGPKeyPropName;
BufferSize: PGPSize;
pProp: Pointer;
var FullSize: PGPSize): PGPError; cdecl;
PGPGetKeyTime: function(Key: pPGPKey;
PropName: PGPKeyPropName;
var Prop: PGPTime): PGPError; cdecl;
PGPGetSubKeyBoolean: function(SubKey: pPGPSubKey;
PropName: PGPKeyPropName;
var Prop: PGPBoolean): PGPError; cdecl;
PGPGetSubKeyNumber: function(SubKey: pPGPSubKey;
PropName: PGPKeyPropName;
var Prop: PGPInt32): PGPError; cdecl;
PGPGetSubKeyPropertyBuffer: function(SubKey: pPGPSubKey;
PropName: PGPKeyPropName;
BufferSize: PGPSize;
pProp: Pointer;
var FullSize: PGPSize): PGPError; cdecl;
PGPGetSubKeyTime: function(SubKey: pPGPSubKey;
PropName: PGPKeyPropName;
var Prop: PGPTime): PGPError; cdecl;
PGPGetUserIDBoolean: function(UserID: pPGPUserID;
PropName: PGPUserIDPropName;
var Prop: PGPBoolean): PGPError; cdecl;
PGPGetUserIDNumber: function(UserID: pPGPUserID;
PropName: PGPUserIDPropName;
var Prop: PGPInt32): PGPError; cdecl;
PGPGetUserIDStringBuffer: function(UserID: pPGPUserID;
PropName: PGPUserIDPropName;
BufferSize: PGPSize;
Data: PChar;
var FullSize: PGPSize): PGPError; cdecl;
PGPGetSigBoolean: function(Cert: pPGPSig;
PropName: PGPSigPropName;
var Prop: PGPBoolean): PGPError; cdecl;
PGPGetSigNumber: function(Cert: pPGPSig;
PropName: PGPSigPropName;
var Prop: PGPInt32): PGPError; cdecl;
PGPGetSigPropertyBuffer: function(Cert: pPGPSig;
PropName: PGPSigPropName;
BufferSize: PGPSize;
Data: PChar;
var FullSize: PGPSize): PGPError; cdecl;
PGPGetSigTime: function(Cert: pPGPSig;
PropName: PGPSigPropName;
var Prop: PGPTime): PGPError; cdecl;
{ Get property functions 7.X}
PGPGetKeyDBObjBooleanProperty7: function(Obj: pPGPKeyDBObj;
WhichProperty: PGPKeyDBObjProperty; var Prop: PGPBoolean): PGPError; cdecl;
PGPGetKeyDBObjNumericProperty7: function(Obj: pPGPKeyDBObj;
WhichProperty: PGPKeyDBObjProperty; var Prop: PGPInt32): PGPError; cdecl;
PGPGetKeyDBObjTimeProperty7: function(Obj: pPGPKeyDBObj;
WhichProperty: PGPKeyDBObjProperty; var Prop: PGPTime): PGPError; cdecl;
// Get the data for a binary property. Returns kPGPError_BufferTooSmall if
// the buffer is too small. Both buffer and dataSize can be NULL.
PGPGetKeyDBObjDataProperty7: function(Obj: pPGPKeyDBObj;
WhichProperty: PGPKeyDBObjProperty; Buffer: PChar;
BufferSize: PGPSize; var DataSize: PGPSize): PGPError; cdecl;
{ Convenience property functions }
// PGP 6.5.X
PGPGetPrimaryUserID: function(Key: pPGPKey;
var UserID: pPGPUserID): PGPError; cdecl;
// PGP 7.X
{PGPGetPrimaryUserID: function(Key: pPGPKeyDBObj;
var UserID: pPGPKeyDBObj): PGPError; cdecl;}
// PGP 6.5.X
PGPGetPrimaryUserIDNameBuffer6: function(Key: pPGPKey;
BufferSize: PGPSize;
UserID: PChar;
var FullSize: PGPSize): PGPError; cdecl;
// PGP 7.X
PGPGetPrimaryUserIDName7: function(Key: pPGPKeyDBObj;
UserID: PChar;
BufferSize: PGPSize;
var FullSize: PGPSize): PGPError; cdecl;
// PGP 6.5.X
PGPGetPrimaryUserIDValidity: function(Key: pPGPKey;
var Validity: PGPValidity): PGPError; cdecl;
// PGP 7.X
{PGPGetPrimaryUserIDValidity: function(Key: pPGPKeyBDObj;
var Validity: PGPValidity): PGPError; cdecl;}
{ Default private key functions 6.5.X }
PGPSetDefaultPrivateKey: function(Key: pPGPKey): PGPError; cdecl;
PGPGetDefaultPrivateKey: function(Keyset: pPGPKeySet;
var Key: pPGPKey): PGPError; cdecl;
{ Key ID functions }
// PGP 6.5.X
PGPGetKeyByKeyID6: function(KeySet: pPGPKeySet;
const PGPKeyID: TPGPKeyID7;
PubKeyAlgorithm: PGPPublicKeyAlgorithm;
var Key: pPGPKey): PGPError; cdecl;
// PGP 7.X
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?