I want to use AES encryption/decryption using CryptoSwift library.
I used a library using pod. following pod I used.
pod 'CryptoSwift', :git => "https://github.com/krzyzanowskim/CryptoSwift", :branch => "master"
After installing pod in a project when I compiled the project it's give number of errors.
Asked
Active
Viewed 1,938 times
0

Cœur
- 37,241
- 25
- 195
- 267

Urvish Patel
- 175
- 1
- 11
-
can you please try only with pod 'CryptoSwift' – PPL Apr 12 '18 at 06:51
-
yes i also tried but did not get any success – Urvish Patel Apr 12 '18 at 06:57
-
what is swift version? – PPL Apr 12 '18 at 07:01
-
i used swift 4.0 and xcode9.2 – Urvish Patel Apr 12 '18 at 08:09
-
It should work, as it is working over here – PPL Apr 12 '18 at 08:10
-
Can you please provide me a demo project link ? It would be great help for me and thanks for your help. – Urvish Patel Apr 12 '18 at 08:51
-
I don't have demo, I have created one. can you please share your code? – PPL Apr 12 '18 at 09:13
-
I did not added any code.just install the pod and build a project that time i got a number of errors. – Urvish Patel Apr 12 '18 at 09:19
-
send me that code, I will resolve it – PPL Apr 12 '18 at 09:22
-
here is link https://www.dropbox.com/s/osxqv1414apcyjy/CryptoSwiftDemo.zip?dl=0 – Urvish Patel Apr 12 '18 at 09:22
-
give me few mins plz – PPL Apr 12 '18 at 09:25
-
let me know once you download so I can remove from my dropbox – PPL Apr 12 '18 at 09:37
-
It is best to avoid using CryptoSwift, amoung other things it is 500 to 1000 times slower than Common Crypto based implementations. Apple's Common Crypto is FIPS certified and as such has been well vetted, using CryptoSwift is taking a chance on correctness and security such as timing and power attacks. – zaph Apr 12 '18 at 12:41
-
@zaph As per my project requirement i need to use encryption/decryption that's why i use CryptoSwift library. Can you please suggest me..? – Urvish Patel Apr 13 '18 at 04:58
-
Apple provided Common Crypto is fast and correct because is uses the builtin crypto hardware, CryptoSwift does not. In the CryptoSwift ReadMe the rational for it's develop,enmt is "Why? Because I can.", not be cause it is better in some way. Also notice there are no benchmarks other than in in Issues: Speed Questions #30. – zaph Apr 13 '18 at 12:29
2 Answers
1
CocoaPods could not find compatible versions for pod "CryptoSwift":
Please find below error, I saw when try to install pod in your project.
I found this error while pod install
in your demo project.
Solution
Remove pod 'CryptoSwift'
from your podfile, then do pod install
then again add pod 'CryptoSwift'
in your podfile and run pod install, it will work.
Your pod file will looks like this,
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'CryptoSwiftDemo' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'CryptoSwift'
# Pods for CryptoSwiftDemo
end

PPL
- 6,357
- 1
- 11
- 30
0
Check swift version of the framework, if it is of older swift version, toggle the "Use Legacy Swift Language Version" from "No" to "Yes" in project settings. Refer Use Legacy Swift Language Version - Xcode 8.2 for more.
Hope this will help.

Rupendra
- 89
- 1
- 2