Skip to main content

New answers tagged

1 vote

Decryption returns different value than was encrypted

Corrected your code a bit. Blob cryptoKey = Crypto.generateAesKey(256); String UUID = '123'; Blob data = Blob.valueOf(UUID); Blob encryptedData = Crypto.encryptWithManagedIV('AES256', cryptoKey, data);...
MandyKool's user avatar
  • 571
0 votes
Accepted

Decryption returns different value than was encrypted

Not sure exactly what you are doing, but note that your UUID string is not a base 64 encoded value. If you make sure to first encode it, you get consistent behaviour: Blob cryptoKey = Crypto....
Phil W's user avatar
  • 37k

Top 50 recent answers are included