Does the managed WinRT API include a way to compute an MD5 hash? [closed]

笑着哭i 提交于 2019-12-12 10:43:44

问题


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


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/8297627/does-the-managed-winrt-api-include-a-way-to-compute-an-md5-hash

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!