System.Security.Cryptography包

时间:2018-06-05 19:16:37

标签: c# unity3d dll mscorlib

我一直在努力争取让这个套餐发挥作用。有没有人知道为什么在Unity中这个包没有实现?在使用包中的方法时,我将采用例如CngKey.Import方法抛出以下内容:

NotImplementedException: The method or operation is not implemented.
System.Security.Cryptography.CngKey.Import(System.Byte[] keyBlob, 
System.Security.Cryptography.CngKeyBlobFormat format)

我尝试了什么:

  • 在Visual Studio中使用新的控制台项目 - 这很好。

  • 在我的另一台Mac计算机上使用,看起来这个包甚至无法在mac上识别。

  • 将.dll拖入Unity。

  • 从nuget安装所有加密软件包。

  • 尝试在visual studio中重新添加任何引用。

  • 将Unity更新到最新版本。

可能是这个包不受支持,但我想在github上发布问题之前我会问。谢谢,非常感谢:)

Edit1:添加了一个使用代码的小例子。 在我的编辑器中,文本是红色的,但是编译并在运行时抛出NotImplementedException,如上所述。

using (CngKey key = CngKey.Import(new byte[] { 2 }, CngKeyBlobFormat.EccPrivateBlob))
{

}

0 个答案:

没有答案