Crypto API Unable to Decrypt

Hi All,

I am using CryptoAPI for encrypt some data and save this in DB .

i am able to encrypt this data successfully and  save in DB but when go for Decrypt this data i am getting error.
Can any one help me out.

Thanks In Advance.


Regards

Amogh Mishra

Hi Amogh,

can you share code of images or oml so can find actual problem whats going worng.


Regards

Rahul

Hi Rahul,

This is my encryption action where i am using new key and encrypt action and hold in one variable and store in DB

 this is my decrypt action-


But in  decryption  am  getting error.


Regards

Amogh

Solution

Hi Amogh,

As i am seeing you are using two different key for one for Encrypt and one for decrypt this is wrong way,so you got error.

You need to use same key for Decryption which you use for Encryption.

like when save data in DB store Encrypt key as well and use same key for Decryption than you are able to decrypt data.

Encypt key DataType is Bollean.


Hope this will hlep you.

Regards

Rahul Sahu

Solution