Questions tagged [commoncrypto]

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

209 questions
0
votes
2 answers

NSMutableData encryption in place using NSInputStream

I am trying to use CommonCrypto to encrypt an NSMutableData object in place (copying the resulting bytes to itself, without duplicating it). Previously, I was using CCCrypt() "one-shot" method, mainly because it seemed simple. I noticed that my data…
József Vesza
  • 4,775
  • 3
  • 27
  • 42
0
votes
1 answer

3DES encryption using CFB8 and no padding in iOS?

I am developing an application which will send encrypted data to a server. The server uses 3des with CFB8 and no padding. I have read most of the related questions in stackoverflow but still unable to get it work. Been working on this for few days…
Bharat
  • 2,987
  • 2
  • 32
  • 48
0
votes
0 answers

CCCrypt crashes with EXC_BAD_ACCESS

I am encrypting a video and sometimes I get a crash with CCCrypt. This is my encryption method, can anyone shed any light on why it might crash? (The process is run in an NSOperation in a queue). The crash occurs on the CCCryptorStatus cryptStatus =…
Darren
  • 10,182
  • 20
  • 95
  • 162
0
votes
2 answers

Is CCKeyDerivationPBKDF thread safe?

I'm using CCKeyDerivationPBKDF to generate and verify password hashes in a concurrent environment and I'd like to know whether it it thread safe. The documentation of the function doesn't mention thread safety at all, so I'm currently using a lock…
DasIch
  • 2,549
  • 1
  • 15
  • 23
0
votes
1 answer

CommonCrypto in iOS [sqlite file encryption]

I'm using Core Data API in my iOS application. Also, I'm using the commoncrypto library (CCCrypt()) to encrypt/decrypt the database file(.sqlite file) that resides in the documents folder when the application state changes…
Balaji
  • 261
  • 6
  • 12
0
votes
2 answers

Working SHA1 code in iOS5 not working in iOS6

The following worked just fine with iOS5 as the base class but fails (SIGABRT) with iOS6. Could it be an OS thing or an architecture thing? Important to also note is the accompanying MD5 hash does work. -(NSString *)SHA1Hash { const char *cStr =…
sbonami
  • 1,892
  • 17
  • 33
0
votes
1 answer

iphone cbc encryption returning null

I have the following code inside the NSData+AES256 class. I am trying AES CBC encryption to a NSString with the following code. I have a key and a iv. But getting null in result. Can not find out what's wrong. This is what I tried- NSString *initV=…
Mahbub Morshed
  • 915
  • 9
  • 20
0
votes
1 answer

Mac OS X: kSecPublicKeyAttrs undeclared identifier

I'm trying to generate a RSA Key in my Mac OS X App, I use this code: CFStringRef privateTag = (CFStringRef)@"com.example.privatekey"; CFStringRef publicTag = (CFStringRef)@"com.example.publickey"; int bits = 1024; CFMutableDictionaryRef…
plaetzchen
  • 757
  • 6
  • 22
-1
votes
1 answer

Does MD5 hashing in web-service headers will change encryption in the iOS app?

In my app, I have added MD5 hashing in my web-service header, and now I am uploading the app on Appstore, here they ask for does my app changed encryption in new build? so, do I need to say "yes" or "no" while upload second version of app on…
g212gs
  • 863
  • 10
  • 26
-1
votes
1 answer

Encryption is not working in Swift4.2 using CommonCrypto. Throwing error 4301

I have been trying to implement encryption using CommonCrypto library in swift 4.2. But no luck, ending up with some unknown error. Somebody please look at this code and help me. func encrypty(data value: String) -> EncryptionResult { guard var…
Vinay Hosamane
  • 346
  • 1
  • 5
  • 15
-1
votes
1 answer

SHA256 Hash algorithm produces different results in iOS using Common Crypto and OpenSSL

Are the Hash functions different in Apple's Common Crypto and OpenSSL? I'm trying to generate SHA256 of the same string using the below two methods and both produce different results. Am I doing anything different? I am under the impression that the…
AndroidDev
  • 5,193
  • 5
  • 37
  • 68
-1
votes
1 answer

Using CommonCrypto with an IV but always returning nil

I am using the CommonCrypto CCCryptorCreate to decrypt a message. I am using a password and an IV but it always returns nil. If I use the CCCryptorCreate to decrypt, but don't use an IV on during encryption on the RUBY side and don't use the IV on…
jdog
  • 10,351
  • 29
  • 90
  • 165
-2
votes
1 answer

iOS : AES Encryption

I am getting wrong encryption in iOS, android is work perfectly, here is both code. Here is the Android AES Encryption Code. private final String characterEncoding = "UTF-8"; private final String cipherTransformation =…
Bhavesh Dhaduk
  • 1,888
  • 15
  • 30
-3
votes
1 answer

AES Encryption objective c counter part for java code

I would like to convert the below Java aes encryption to objective c. Anyone who has knowledge in both Java and Objective C please help. Any help will be greatly appreciated. Can anyone help by providing the details of encryption method used? …
isarathg
  • 858
  • 1
  • 19
  • 37
1 2 3
13
14