You need to sign in to do that
Don't have an account?
deepakpi
Crypto.encryptWithManagedIV throws internal server error
Hi,
When I use below code I am getting internal server error.
String hexkey='CE993A13754340D1FED14A9EFB4A058D'; // given by 3rd part app developer
Blob b=Blob.valueOf(hexkey);
Blob encryptedBlob=Crypto.encryptWithManagedIV('AES128', b, 'some clear text' );
Did anybody face similar issue before?
Thanks,
Deepak
It seems that you have passed wrong type of parameter in method as given below :
Blob encryptedBlob=Crypto.encryptWithManagedIV('AES128', b, 'some clear text' );
3rd parameter of this method must be the Blob type. So first you need to convert it string to Blob and then pass to method.
Blob encryptedBlob=Crypto.encryptWithManagedIV('AES128', b, Blob.valueOf('some clear text' ));
Hope this helps.