Questions tagged [commoncrypto]

Apple's cryptography framework. Contains functions for generating commonly-used hashes and cryptographic functions.

209 questions
9
votes
1 answer

lib commonCrypto not available for iOS simulator?

I've been adding libCommonCrypto.dylib to my project to do md5 hash verification. Works all proper on the iPhone (iOS 5.1), but when I try to run it on the simulator, I get this error: ld: library not found for -lcommonCrypto clang: error: linker…
Martin Schultz
  • 2,571
  • 2
  • 26
  • 31
9
votes
4 answers

Are CC_MD5() and CC_SHA1() available in iOS 4?

I am looking to make use of MD5 or SHA-1 in my iOS application targeted at iOS 4 and later. I use the CC_MD5() and CC_SHA1() functions from CommonCrypto/CommonDigest.h. It seems to work fine on an iPhone running iOS 4.1 and in the iPhone 4.0…
GBegen
  • 6,107
  • 3
  • 31
  • 52
9
votes
1 answer

Xcode 7.3 beta 1 vs. CommonCrypto in Swift

I'm using CommonCrypto in a Swift framework - and it's been working fine for over a year. I used solutions found here: Importing CommonCrypto in a Swift framework Specifically, to reference CommonCrypto from the Swift framework, I had to: Create a…
Daniel
  • 8,794
  • 4
  • 48
  • 71
7
votes
2 answers

iOS CommonCrypto reference

I'm trying to find some sort of reference for the Apple's CommonCrypto library, because apparently Apple doesn't have any obvious link for that, and the ones given by Google are outdated, like this one below:…
anavarroma
  • 1,382
  • 1
  • 12
  • 29
6
votes
1 answer

Library not found for -lcommonCrypto

I need to link my ios 5 app with CommonCrypto. The problem is that I can't compile due to this error: 'Library not found for -lcommonCrypto'... How can I solve?
goodolddays
  • 2,595
  • 4
  • 34
  • 51
6
votes
1 answer

Kotlin Native (iOS), using CValuesRef with CCCrypt

I am working on an AES256 encryption algorithm in a Kotlin Multiplatform project targeting iOS. I checked some of the existing libraries that implement this in pure Kotlin (such as krypto), but none of them fit the requirements that I have from the…
MrAsterisco
  • 797
  • 8
  • 21
6
votes
5 answers

How to encrypt using AES GCM on iOS?

I need to encrypt/decrypt some data using AES encryption on GCM mode, but apparently this can't be done with the CommonCrypto API. This has been asked previously here, but the accepted answer is not what I'm looking for, since I need to use this…
Gabriel Huff
  • 743
  • 1
  • 6
  • 18
6
votes
0 answers

iOS local receipt validation with CommonCrypto framework

Simple question: Did anyone manage to perform local receipt validation with CommonCrypto framework instead of OpenSSL and if yes - is there any sample code how to do that? So, replace all OpenSSL related things from Apple docs…
uerceg
  • 4,637
  • 6
  • 45
  • 63
6
votes
0 answers

Create Swift framework pod spec dependant on CommonCrypto

I've written small library for One-Time Passwords and I'd like to make it available through CocoaPods but I'm failing at pod spec validation. -> OTPGenerator (1.0) - ERROR | [iOS] Returned an unsuccessful exit code. You can use --verbose for…
Marcin Zbijowski
  • 820
  • 1
  • 8
  • 23
6
votes
2 answers

Use ecc for encryption in ios

I am trying to implement ecc technique for encryption. I went through the following posts: Shared Secret based on Elliptic curve Diffie–Hellman with CommonCrypto Elliptic Curve Crypto in iOS which doesn't have any satisfactory solutions. Now, I…
6
votes
1 answer

SecKeyRef from X.509 ASN.1 RSA Public Key in iOS

I realize that there are a lot of similar questions to the one I am about to ask already on Stack Overflow, but none of them have clear answers that really satisfy my needs, so here we go: My program receives an ASN.1 encoded RSA public key over the…
arjunyg
  • 174
  • 1
  • 8
6
votes
3 answers

Reliable way to tell if wrong key is used in aes256 decryption

I have some code that I am using to encrypt and decrypt some strings in an ios application. The code involves the use of CCCrypt. Is there a reliable way to test the validity of a key used without actually storing the key anywhere? From my…
Kris Gellci
  • 9,539
  • 6
  • 40
  • 47
5
votes
2 answers

For AES128 using CCCrypt() can the key be longer than 128 bits?

I am using the CCCrypt method. Can I use a longer key than than 128bit? Can it be arbitrarily long? Or perhaps multiples of 128? If so how would I do this? I didn't think this woas possible but I found this text: here Some algorithms such as AES…
Robert
  • 37,670
  • 37
  • 171
  • 213
5
votes
2 answers

How is CommonCrypto used in SWIFT3?

The guidance is to to use #import "CommonCrypto/CommonCrypto.h" in the bridging header. This is from the question at: SHA256 in swift. However, when I use the answers given by Andi and Graham Xcode still complains about "use of unresolved identifier…
Metis
  • 51
  • 1
  • 2
5
votes
2 answers

Equivalent of spongycastle encryption for ios

This has stumped me - the following code uses SpongyCastle's encryption/decryption for Android - I am trying to achieve cross-platform encryption/decryption for iOS. The following code (from Android) works a treat, AES 128bit CBC with PKCS7Padding,…
t0mm13b
  • 34,087
  • 8
  • 78
  • 110
1
2
3
13 14