2

I want to calculate md5 hash codes from strings in a playgroundbook, but i got this error message, but i included it as this way:

import CommonCrypto

I can not use these: CC_MD5, CC_LONG, CC_MD5_DIGES_LENGTH etc,etc.

Thanks!

user2948919
  • 201
  • 1
  • 2
  • 5
  • 1
    Possible duplicate of [CommonHMAC in Swift](http://stackoverflow.com/questions/24099520/commonhmac-in-swift) – shallowThought Feb 21 '17 at 12:24
  • I want to calculate it in the iPad playgrounds application. Thanks! – user2948919 Feb 22 '17 at 01:23
  • Apparently, it is not possible to do this without a Swift project. Use Swift Project as well as Playground. – Sachin Vas Feb 22 '17 at 01:47
  • I am newbie, maybe i don't know how it is working, but I want to use it in a playgroundbook, likes the "Learn to code" lessons, not in a Swift Project. Thanks! – user2948919 Feb 22 '17 at 01:54
  • I'd been trying to do this exactly, there is no way Apple haven't implemented classic hash and cryto algorithms in Swift already, this might be a good request for the Swift repository – Jorge Vicente Mendoza Mar 14 '17 at 23:23
  • Here's [my pure Swift implementation](https://github.com/NikolaiRuhe/SwiftDigest) that does not need CommonCrypto. – Nikolai Ruhe Sep 20 '17 at 16:45

0 Answers0