Reputation: 423
I'm using Bcrypt.net hashing for passwords in Windows Store App. It works fine when built and tested in windows tablets. But when I'm trying to upload this app to store it fails in supported API test.
Following error details is given
API System.ApplicationException in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. BCrypt.Net.dll calls this 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.
What can be done for this? Any ideas? Thanks in Advance.
Upvotes: 0
Views: 442
Reputation: 1270
I know this is a bit late to the party but I have ported BCrypt.net to .net Core, so you should be able to use it now. Just swap out your dependency to the one here:
https://www.nuget.org/packages/BCrypt.Net-Core/
It should be a drop in replacement.
Upvotes: 1
Reputation: 4680
As the error message stated
API System.Runtime.Serialization.SerializationInfo in MSCORLIB, PUBLICKEYTOKEN=B77A5C561934E089 is not supported for this application type. BCrypt.Net.dll calls this API.
The SerializationInfo class does not belong to .NET for Store App.
You can not use BCrypt.NET in store app development because it is build on full .NET, I recommend you using HashAlgorithmProvider class in Windows Runtime App.
Upvotes: 2