简体   繁体   中英

UWP, Hashing Password for Windows 10 November Update (10586)

My codes are as shown below. I'm using CryptSharpOfficial 2.1.0.

result = Crypter.Blowfish.Crypt("test",
new CrypterOptions()
{
    CrypterOption.Variant, BlowfishCrypterVariant.Corrected
    },
    {
        CrypterOption.Rounds, 6
    }
});

They are working juts fine when I set the min targeting to "Fall Creators Update (10.0; Build 16299)".

But I want to simulate my app in mobile emulators, so that's why I have to set my min targeting to "November Update (10.0; Build 10586)". But it gives me this error:

    Error   NU1202  Package CryptSharpOfficial 2.1.0 is not compatible with
 uap10.0.10586 (UAP,Version=v10.0.10586) / win10-arm-aot. Package 
CryptSharpOfficial 2.1.0 supports: net (.NETFramework,Version=v0.0) 

Should I use difference packages for hashing password? or is there another way to solve it? All I need is hashing my password into something that starts with "$2y$"

As the error info, the Package CryptSharpOfficial 2.1.0 is not compatible with the 10586 version or the windows 10 phone with arm platform. If you want the hashing function in build 10586 phone, this package maybe not work as you want and you should use some other APIs.

In UWP, you can use the official HashAlgorithmProvider class to enumerate the available hash algorithms and create a CryptographicHash value. You can see the Hashes topic for the details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM