You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.
Hi, I have this snippet of code working with a sha256 with 32 length key
let plainText :String = "this is my plain text"
let key :String = "your key"
let cryptLib = CryptLib()
let iv = "5/LRE3jKOTCav8VB"
let size = 32
let sha = cryptLib.sha256(key, length: size)
let cipherText = cryptLib.encrypt(plainText.data(using: String.Encoding.utf8), key: sha, iv: iv)
print(cipherText!.base64EncodedString())
let elem = cryptLib.decrypt(cipherText, key: sha, iv: iv)
let salida = String.init(data: elem!, encoding: String.Encoding.utf8)
print(salida!)
But when i change size = 24, it fails the decrypt, is there any way to make the decryption it work ?, i am in a proyect that needs a 24 length key.
The text was updated successfully, but these errors were encountered:
Hi, I have this snippet of code working with a sha256 with 32 length key
let plainText :String = "this is my plain text"
let key :String = "your key"
let cryptLib = CryptLib()
let iv = "5/LRE3jKOTCav8VB"
let size = 32
let sha = cryptLib.sha256(key, length: size)
let cipherText = cryptLib.encrypt(plainText.data(using: String.Encoding.utf8), key: sha, iv: iv)
print(cipherText!.base64EncodedString())
let elem = cryptLib.decrypt(cipherText, key: sha, iv: iv)
let salida = String.init(data: elem!, encoding: String.Encoding.utf8)
print(salida!)
But when i change size = 24, it fails the decrypt, is there any way to make the decryption it work ?, i am in a proyect that needs a 24 length key.
The text was updated successfully, but these errors were encountered: