Windows Store应用程序不允许使用BCrypt

时间:2015-07-14 13:32:07

标签: c# windows-store-apps windows-store bcrypt.net

我在Windows Store App中使用Bcrypt.net哈希密码。在Windows平板电脑中构建和测试时,它工作正常。但是,当我尝试将此应用程序上传到商店时,它在支持的API测试中失败。

提供以下错误详情

此应用程序类型不支持MSCORLIB中的API System.ApplicationException,PUBLICKEYTOKEN = B77A5C561934E089。 BCrypt.Net.dll调用此API。

API System.Runtime.Serialization.SerializationInfo in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. BCrypt.Net.dll calls this API.
API System.Security.Cryptography.RandomNumberGenerator in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. BCrypt.Net.dll calls this API.
API System.ApplicationException.#ctor in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. BCrypt.Net.dll calls this API.
API System.ApplicationException.#ctor(System.String) in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. BCrypt.Net.dll calls this API.
API System.ApplicationException.#ctor(System.String,System.Exception) in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. BCrypt.Net.dll calls this API.
API System.ApplicationException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. BCrypt.Net.dll calls this API.
API System.Text.StringBuilder.AppendFormat(System.String,System.Object) in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. BCrypt.Net.dll calls this API.
API System.Security.Cryptography.RandomNumberGenerator.Create in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. BCrypt.Net.dll calls this API.
API System.Security.Cryptography.RandomNumberGenerator.GetBytes(System.Byte[]) in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. BCrypt.Net.dll calls this API.

可以为此做些什么?有任何想法吗? 在此先感谢。

1 个答案:

答案 0 :(得分:1)

我知道派对有点晚了,但我已将BCrypt.net移植到.net Core,所以你现在应该可以使用它了。只需将您的依赖项换成这里的依赖项:

https://www.nuget.org/packages/BCrypt.Net-Core/

应该是替代品。