What is the equivalent of the C# method SHA512CryptoServiceProvider.ComputeHash() in C++ WinRT?
What is the equivalent of the C# method SHA512CryptoServiceProvider.ComputeHash() in C++ WinRT?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See
Windows.Security.Cryptography.Core.CryptographicHashand friends. There is an example on that page demonstrating one usage, and the documentation for related classes and functions have examples as well.For a “complete” example, you can take a look at the
compute_sha1_hashfunction from my Boost-licensed CxxReflect library. It computes an SHA1 hash; computing an SHA512 hash should simply require changing the requested hash algorithm from “SHA1” to “SHA512”. Note that this function is written using WRL, not C++/CX, though converting the code to C++/CX should be straightforward and would result in much more succinct code.