How to execute SHA512 hash in C ++ WinRT?

What is equivalent to C # SHA512CryptoServiceProvider.ComputeHash () method in C ++ WinRT?

0
c ++ windows-runtime
source share
1 answer

See Windows.Security.Cryptography.Core.CryptographicHash and friends. There is an example on this page that demonstrates one use, as well as documentation for related classes and functions. There are also examples.

For a β€œcomplete” example, you can take a look at the compute_sha1_hash function in my CxxReflect library licensed by Boost. It computes the SHA1 hash; computing the 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, although converting the code to C ++ / CX should be simple and lead to much more compressed code.

+2
source share

All Articles