Am trying to decrypt the encoded string (which is actually encoded in java using bouncyCastle provider). As i dont see any equivalent algo for "PBEWITHSHA256AND256BITAES-CBC-BC" in nodejs. Could you please suggest me how can i decrypt the encryptedValue(which was encrypted in java) in nodejs.
I tried few approaches, but not able to find the solution.
From Java: Below is the approach
- bouncyCastle provider
- Algo# PBEWITHSHA256AND256BITAES-CBC-BC
- encodedOutputType as "Hex"
we got the result back as string which is hexadecimal string.
From Nodejs: I tried to decrypt using nodejs-crypto package.
- Converted back to array values from the hexadecimal String
- Used pbkdf2sync to create the key using sha256
- tried to decrypt the data using crypto.createDecipherIv but somehow am not able to decrypt in nodejs.
Could someone please suggest me the approach.