AddPublicKeyRecipientFromStore

安全與簽章

描述

從 Windows 憑證存放區加入 X.509 憑證作為公開金鑰加密的收件者

語法

Delphi

Function TPDFlib.AddPublicKeyRecipientFromStore(Const StoreName, CertificateName: WideString; UseMachineStore, Permissions: Integer): Integer;

ActiveX

Function PDFlib::AddPublicKeyRecipientFromStore(StoreName As String, CertificateName As String, UseMachineStore As Long, Permissions As Long) As Long

DLL

int DLAddPublicKeyRecipientFromStore(int InstanceID, const wchar_t* StoreName, const wchar_t* CertificateName, int UseMachineStore, int Permissions);

參數

StoreNameWindows 憑證存放區名稱,例如 MY
CertificateName簡單顯示名稱(不分大小寫);空字串表示選取第一張憑證
UseMachineStore本機(local machine)存放區用非零值;目前使用者存放區用零
PermissionsEncodePermissions 傳回的權限遮罩

傳回值

1收件者憑證已加入
0存放區、憑證、權限或文件狀態無效

備註

DLL 另外匯出 ANSI 字串用的 DLAddPublicKeyRecipientFromStoreA

另請參閱

SetPublicKeyDecryptionStore, EncryptPublicKey