I've worked with Java cryptography for many years. Now, we have a requirement to write an iOS application that will send encrypted payloads from the mobile device to a Java service. I've begun working with the iOS crypto support (CommonCrypto, etc.) and have found it a bit more difficult. The JCE has a very clean, concise API, so I've clearly gotten spoiled. In contrast, iOS cryptography is a far more difficult API to work with.
Are there any simplified crypto libraries or wrappers around CommonCrypto that provide a more concise API? In particular, we need:
I know I've seen a sample class or two that wraps AES encryption, for example. I'm looking for something a bit richer and more full-featured. Anyone have any suggestions?
CryptoKit is a new Swift framework that makes it easier and safer than ever to perform cryptographic operations, whether you simply need to compute a hash or are implementing a more advanced authentication protocol.
CommonCrypto is a C library, so that makes it a little bit unpalatable to use in Swift. It is part of System.
Sodium is a modern, easy-to-use software library for encryption, decryption, signatures, password hashing, and more.
CryptoSwift is a growing collection of standard and secure cryptographic algorithms implemented in Swift. View the Project on GitHub krzyzanowskim/CryptoSwift.
You can use openSSL inside your iOS app, for ease of use you can use the SSCrypto library by septicus.
From the septicus site:
SSCrypto.framework provides a simple wrapper around OpenSSL library functions for encryption, decryption (both symmetric and RSA) and checksums. It also encodes and decodes base64 data and can generate both private and public RSA keys. A test tool is included in the project. Click here to see the main.m file that comes with SSCrypto for examples of it's use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With