简体   繁体   English

UWP,Windows 11月10日更新的哈希密码(10586)

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

My codes are as shown below. 我的代码如下所示。 I'm using CryptSharpOfficial 2.1.0. 我正在使用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)". 当我将最低定位条件设置为“秋季创作者更新(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)". 但是我想在移动模拟器中模拟我的应用程序,因此这就是为什么我必须将最小定位设置为“ 11月更新(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$" 我所需要的只是将密码散列为以“ $ 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. 作为错误信息,程序包CryptSharpOfficial 2.1.0与10586版本或带Arm平台的Windows 10手机不兼容。 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. 如果您希望在内置10586手机中使用哈希功能,则此软件包可能无法按您希望的方式工作,您应该使用其他一些API。

In UWP, you can use the official HashAlgorithmProvider class to enumerate the available hash algorithms and create a CryptographicHash value. 在UWP中,您可以使用官方的HashAlgorithmProvider类枚举可用的哈希算法并创建CryptographicHash值。 You can see the Hashes topic for the details. 您可以查看哈希主题以了解详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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