Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

cryptography - Crypto library suitable for Objective-C

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 perfect to use with Objective-C. Here is my needs for this library: AES (Rijndael) CFB Mode SHA1 SHA256 HMAC-SHA1 HMAC-SHA256 PBKDF2

Your help will be greatly appreciated.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...