1

as I'm very new to this field i don't have much knowledge in this domain. I want to achieve SHA-512 secure hashing in my Application. I' using,

EVP_get_digestbyname((const char*)[digestName UTF8String]);

and passing 'SHA512' in digestname...it was working when i was passing SHA1, but will it work when I pass SHA512 as parameter?

TeaCupApp
  • 11,227
  • 17
  • 67
  • 145
Abhrajit
  • 107
  • 1
  • 11

1 Answers1

3

If you just want a SHA-512 hash, use CC_SHA512 or the related functions. Run man CC_SHA512 in Terminal for information.

If you want a SHA-512 HMAC, use CCHmac or the related functions, with kCCHmacAlgSHA512 as the algorithm argument. Run man CCHmac in Terminal for information.

rob mayoff
  • 358,182
  • 62
  • 756
  • 811