Questions tagged [commoncrypto]

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

209 questions
3
votes
2 answers

No CRC64 implementation equal to CommonCrypto?

I am porting some code from C on OSX to C# that uses CommonCrypto with the kCN_CRC_64_ECMA_182 CRC64 implementation. For example, using CommonCrypto the CRC would be computed with: CNCRC(kCN_CRC_64_ECMA_182, bytes, bytesLen, &crcResult) This outputs…
Rick Button
  • 1,212
  • 13
  • 19
3
votes
1 answer

Where is the class CryptoCommon in xamarin

Im trying to use the CryptoCommon class but unable the find it in the monotuch assembly. I found the assembly Mono.Security.Cryptography, does it have the same performance as the CryptoCommon class? Thanks!!
IturPablo
  • 1,572
  • 2
  • 22
  • 35
3
votes
2 answers

128 bit AES encryption returns null in Objective-C

I am trying to encrypt a string using AES 128 bit encryption, but the encrypted data converted, when converted to a string, always returns null. NSString *iv = @"fedcba9876543210"; NSString *key = @"0123456789abcdef"; - (NSData…
itdeeps
  • 277
  • 10
  • 25
3
votes
2 answers

Decrypting AES CTR Little Endian with PHP

I'm having trouble using PHP to decrypt strings that were encrypted with iOS 5.x's CommonCrypto libraries. Here are the parameters: Algorithm: AES-128 Mode: CTR Mode options: CTR Little-Endian Padding: None Here's a sample of my best attempt at…
curtisdf
  • 4,130
  • 4
  • 33
  • 42
3
votes
2 answers

How can I use a PKCS8 RSA DER Private Key in iOS?

At run time, my iOS application receives a file with a public-private RSA key-pair, generated by someone else's Java: KeyPairGenerator keygenerator; keygenerator = KeyPairGenerator.getInstance("RSA"); keygenerator.initialize(4096); KeyPair keypair…
Cathy
  • 515
  • 7
  • 23
2
votes
1 answer

Using CommonCrypto to generate a salted key

This is how I have been generating my cryptographic keys until now: unsigned char *salt; //8 salt bytes were created earlier unsigned char *password; //password was obtained earlier int passwordLength; //password length as well unsigned char…
pf85
  • 195
  • 2
  • 12
2
votes
1 answer

CommonCrypto in iOS producing different results to openssl command line

I'm using CommonCrypto in my app to decrypt some data encrypted using openssl. In order to test the encryption, I've tried to encrypt some sample data and its quite surprise that the outputs of my encryption (which is aes ecb) are different from…
2
votes
1 answer

Kingfisher: No such module 'CommonCrypto'

I have installed the latest version of Kingfisher i.e. pod 'Kingfisher', '~> 5.0', yet when I try to build my project I am receiving the following compile error: No such module 'CommonCrypto' String+MD5.swift I have no idea why this error is…
Hudi Ilfeld
  • 1,905
  • 2
  • 16
  • 25
2
votes
1 answer

ld: framework not found IDZSwiftCommonCrypto

I have installed the pod libcommoncrypto, the path is /Pods/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/*.swift files I fail to understand why Xcode is not able to find a framework installed by the pod. Edit (Podfile) source…
Siddharth
  • 9,349
  • 16
  • 86
  • 148
2
votes
1 answer

No such module Common Crypto

I am working with swift 3.2. I have made a bridging header file which has the following: #import In my projects build setting I am pointing to my bridging header file but i am still getting the error 'No such module…
user2363025
  • 6,365
  • 19
  • 48
  • 89
2
votes
1 answer

DES/ECB/NoPadding in swift 3.1 using Common Crypto

I would like to encrypt and decrypt strings in my iOS app using DES (yes I know DES isn't safe anymore but the app receives and send messages to a BLE module that uses it). I successfully created a bridging header for Common Crypto and I found this…
JamesRGNT
  • 586
  • 1
  • 6
  • 17
2
votes
0 answers

Swift Playgrounds: MD5 vs "no such module CommonCrypto" +iPad Playgrounds application

I want to calculate md5 hash codes from strings in a playgroundbook, but i got this error message, but i included it as this way: import CommonCrypto I can not use these: CC_MD5, CC_LONG, CC_MD5_DIGES_LENGTH etc,etc. Thanks!
user2948919
  • 201
  • 1
  • 2
  • 5
2
votes
1 answer

SHA1 MessageDigest and CommonCrypto updates getting different results

I'm trying to recreate the implementation of PasswordDeriveBytes from VB.NET and so far I have implemented in iOS Objective C code its giving me different results from a Java implementation. The reason why we try to recreate the implementation of…
Tertel
  • 31
  • 4
2
votes
0 answers

No such module 'CommonCrypto' error when testing umbrella app

I've setup an application so that it uses a swift framework that contains a class that uses CommonCrypto utilities. Both the umbrella app and the swift framework have run their own tests independently. Dependencies are as follows: MyApp <---------…
Danny Bravo
  • 4,534
  • 1
  • 25
  • 43
2
votes
2 answers

Converting objective-c code to swift

I really need some help to convert the objective-c code to swift using CryptoSwift. I'm not sure how to use functions like: bzero, getCString, malloc in Swift. +(NSData*)encryptData:(NSData*)data { static NSString *key = @"BitCave012345678"; …
Bart
  • 21
  • 5