Crypto library suitable for Objective-C

前端 未结 3 1254
忘掉有多难
忘掉有多难 2020-12-09 06:18

I\'m looking for a crypto library to use with Objective-C code. There is a C++ library which is too big for my needs. It\'s 20 mb when compiled. I think a C library would be

相关标签:
3条回答
  • 2020-12-09 06:57

    I link against OpenSSL for cryptography in my Objective-C projects. If you're using OS X, this is already installed on every user's machine. There's also a cocoa framework called SSCrypto which provides Objective-C wrappers for openssl, which makes the C-based openssl library a little easier to use.

    0 讨论(0)
  • 2020-12-09 07:11

    I started a libsodium/NaCl wrapper for Objective-C at https://github.com/gabriel/NACL

    0 讨论(0)
  • 2020-12-09 07:15

    The usual/official way to do this is to #import <CommonCrypto/CommonDigest.h>, which is the CommonCrypto library. Then, you can use functions like CC_MD5(), CC_SHA(), CC_HMac(), etc.

    The CommonCrypto man page has links to all the available functions.

    0 讨论(0)
提交回复
热议问题