当我尝试从x64客户端访问cryptoki.dll时出现问题。它适用于x86客户端,但它不能与x64一起使用。
从x64客户端使用cryptoki.dll应该怎么做?
signature.addKeyInfo(new ECertificate(cert.getEncoded()));
var c = HsmManager.getInstance().getSigner("MyPassword", cert);
static Module pkcs11Module = Module.getInstance(@"C:\Program Files\SafeNet\Protect Toolkit 5\Protect Toolkit C SDK\bin\sw\cryptoki.dll");
[MethodImpl(MethodImplOptions.Synchronized)]
public static HsmManager getInstance() {
pkcs11Module.initialize(null);
Slot[] slots = pkcs11Module.getSlotList(true);
}