plaintext ="Hello World"
cipher= "aes-256-cbc"
encryptKey = "7786b7cde4d77e8cbb585e9535f3aa7b"
IV =""
pad = 1
encResult = crypto_encrypt(cipher, encryptKey, IV, plaintext, pad)
function crypto_encrypt(alg, encryptKey, IV , plaintext , pad )
crypto = CreateObject("roEVPCipher")
res = crypto.Setup(true, cipher,encryptKey,IV,pad)
print res
ba = CreateObject("roByteArray")
ba.FromAsciiString(plaintext)
enc =crypto.Process(ba)
return enc.ToBase64String()
end function
Hai
i'm trying to use EVPCipher method to encrypt my data using Aes-256-cbc cipher,but i'm not able setup cipher.its always return -1. Please suggest me, how to use aes-256-cbc cipher encryption.