Questions tagged [cryptoswift]

CryptoSwift is a collection of standards and algorithms to fulfill most cryptographic needs.

CryptoSwift is a collection of standards and algorithms to fulfill most cryptographic needs.

81 questions
0
votes
1 answer

Get IV and secret key from base64 string

I am working with crypto swift library But I have to write below logic in swift as I am very new in kotlin to understand the syntax. Any leads would be greatly appreciated fun decryptAES(data: ByteArray, secretKey: ByteArray): ByteArray { try { …
Arun
  • 2,271
  • 1
  • 14
  • 18
0
votes
0 answers

dyld: Library not loaded: @rpath/CryptoSwift.framework/CryptoSwift

I'm receiving this error on startup dyld: Library not loaded: @rpath/CryptoSwift.framework/CryptoSwift Referenced from:…
Konrad Wright
  • 1,254
  • 11
  • 24
0
votes
1 answer

AES encryption using CryptoSwift and CryptoJS

I was to trying encrypt a text using CryptoSwift for ios application, and CryptoJS for web application, which has to be decrypted in Java platform. I could able to encrypt successfully in javascript by using the following code. var message =…
0
votes
1 answer

why to use cryptoswift framework when apple already provides keychain for security?

I am trying to learn cryptoswift framework for data encryption in iOS, but why to use cryptoswift framework when apple already provides keychain for security?
0
votes
1 answer

Migrating Common Crypto AESEncryption to CryptoSWIFT as decrypted string turns null in some cases

Im using the following code to encrypt and decrypt a string using AES Encryption.I'm using common crypto by adding a Bridging Header. extension String { func aesEncrypt(key:String, iv:String, options:Int = kCCOptionPKCS7Padding) -> String? { …
techno
  • 6,100
  • 16
  • 86
  • 192
0
votes
1 answer

CryptoSWIFT- Type of expression is ambiguous without more context

Im using cryptoswift to decrypt a string let decrypted2 = try AES(key: "35%6HyBW", iv: "erewf^%", blockMode: .CBC, padding: .pkcs7).decrypt(text2) But I keep getting Type of expression is ambiguous without more context Complie time error
techno
  • 6,100
  • 16
  • 86
  • 192
0
votes
0 answers

How to get decrypt value from encrypted JSON file?

I have a encrypted JSON file and I am trying to decrypt it. I am using CryptoSwift framework and AES decryption. I have my key and iv for that and I have to do "AES-128-CBC" decryption. Below is my code: fileprivate func checkJSONDecryption() { …
Kishor Pahalwani
  • 1,010
  • 1
  • 23
  • 53
0
votes
2 answers

Build error while trying to build a Swift-based command line tool depending on a third-party framework: this target might include its own product

Context: I want to create a simple Swift command line tool using CryptoSwift I am relatively new to Xcode and Swift (and MacOS!). Configuration: - MacOS High Sierra 10.13.2 - Xcode: 9.2 Steps: I start Xcode Create a new project “Command Line…
OlivierM
  • 2,820
  • 24
  • 41
0
votes
0 answers

How to solve "Expected identifier for type name" caused by CryptoSwift addition

I have a codebase where I am adding CryptoSwift through pods, and after adding it it compiler has started throwing 20 odd errors of type Expected identifier for type name My PodFile looks like this source…
vishal dharankar
  • 7,536
  • 7
  • 57
  • 93
0
votes
1 answer

How to convert a file into a Array to encrypt in cryptoSwift?

I'm trying to encrypt a file in Swift with the framework Cryptoswift. I made it, but with files a little bit heavy like mp4, mp3, it is very slow. I don't really know what it is happening, if I'm implementing in the wrong way or the algorithm is…
Efrain Perez
  • 63
  • 2
  • 5
0
votes
1 answer

Branching cryptoswift for 2.3

I'm trying to use cocoapods to install crypto swift and am having trouble with what to place in the pod file. I have tried: pod 'CryptoSwift', :git => "https://github.com/krzyzanowskim/CryptoSwift/tree/swift2", :branch => 'master' And I get the…
user2363025
  • 6,365
  • 19
  • 48
  • 89
0
votes
1 answer

Ambiguous use of 'arrayOfBytes()'

Here is my code : func aesEncrypt(key: String, iv: String) throws -> String { let data = self.dataUsingEncoding(NSUTF8StringEncoding) let enc = try AES(key: key, iv: iv, blockMode:.CBC).encrypt(data!.arrayOfBytes()) let encData =…
Darkwonder
  • 1,149
  • 1
  • 13
  • 26
0
votes
0 answers

CryptoSwift and SwiftHTTP issues after upgrading to Xcode 8

I upgrade Xcode version to 8. I found these issues. Is anyone know how to solve these? Please help me.
May Phyu
  • 895
  • 3
  • 23
  • 47
0
votes
0 answers

CryptoSwift + CryptoJS Swift

I really need some help here with decrypting server response encrypted with CryptoJS. I use CryptoSwift to decrypt response. Here is a sample of server response data I…
MaksTheAwesome
  • 138
  • 1
  • 8
0
votes
0 answers

Error: "Block size and Initialization Vector must be the same length!"

I am trying to Encrypt some data and I keep getting this error, Meanwhile my iv and key are at the same size but contain 29 values...This is my code. When I try a key with 16 values it works but I got to work with this other key too and I don't know…
Xhulio Hasa
  • 1
  • 1
  • 2