Questions tagged [cchmac]

Use this tag for questions related to Apple's CCHMac HMAC algorithm interfaces.

CCHMac provides interfaces for following HMAC algorithms:

kCCHmacAlgSHA1    - HMAC with SHA1 digest

kCCHmacAlgMD5     - HMAC with MD5 digest

kCCHmacAlgSHA256  - HMAC with SHA256 digest

kCCHmacAlgSHA384  - HMAC with SHA384 digest

kCCHmacAlgSHA224  - HMAC with SHA224 digest

kCCHmacAlgSHA512  - HMAC with SHA512 digest

Full man page

3 questions
0
votes
1 answer

CommonHMAC in C++

I am trying to use the library in c++ on a mac to encode a string with a key in sha512. I already have a function that will encode a string into sha512, I just don't know how to do it with a key. This is the function I…
Sam Moldenha
  • 463
  • 2
  • 11
0
votes
0 answers

Same hashing algorithm in Java and Swift gives different result

I am new to iOS and Swift and I am using HMACSHA256 algorithm in Java as well as Swift. However, for same input values I am getting different result. I am not sure why. This is my Java Code byte[] secret = new byte[] {0, 0, 0, 0, 38, 8, 117,…
Ashish Kirpan
  • 129
  • 1
  • 3
-1
votes
1 answer

How to simulate CCHmacContext() in iOS Objective C?

i want to transform this method that created Swift3 to Objective C. func HMAC_CREATOR(MIX_STR mixStr:String,KEY_DATA_UINT8 keyDataUint8:Array) -> String { let signatureData : Data = mixStr.data(using: .utf8)! let digest =…
reza_khalafi
  • 6,230
  • 7
  • 56
  • 82