I'm getting this error when I try to access. How to access HSM in .NET C# with crypto.dll library?
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);
}