I'm familiar with CryptoKit and the SHA512 implementation, which is super easy to use.
let digest = SHA512.hash(data: Data("".utf8))
However, I can't seem to find how to compute SHA512/256 (the truncated version of SHA512) anywhere in the Apple CryptoKit documentation. Do I somehow have to combine SHA512
with SHA256Digest
?
I think this pod will do the trick.
This has the implementation for SHA512/SHA256. (Check readme's HASH section: SHA-2)
Link: SHA512/SHA256 Lead