Does the managed WinRT API include a way to comput

2019-06-20 04:21发布

How can I compute MD5 in a Metro Style app that is written in C#?

2条回答
2楼-- · 2019-06-20 04:53

There is lots of information on the locations of various namespaces for Metro at the Metro style app reference.

I'm not sure about MD5, but the the hashing stuff for SHA is in Windows.Security.Cryptography.Certificates

Obviously we don't know if you really need MD5, but if you don't (i.e. you're not talking to something else that expects MD5) then don't - it's often the go-to hashing for people just because it's more famous, but others are often better for all sorts of reasons.

查看更多
女痞
3楼-- · 2019-06-20 05:00

Check out the documentation, apparently this ends up in a Windows namespace. I suspect the HashAlgorithmProvider does what you need, but I couldn't test yet.

查看更多
登录 后发表回答