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
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
Copyright © 2021 Jogjafile Inc.
You've got two typos here.
#1, the prototype you're using doesn't exist. Blockmode takes a
CBC(iv:)
argument.#2, you need to convert strings into a
[UInt8]
array.So use: