3DES vanilla JavaScript Encryption (Rhino)

236 Views Asked by At

I need to do a 3DES encryption, but I need to do it on the back end so I can't use CryptoJS library.

The system I am working on is Salesforce Commerce Cloud (Rhino), which uses JavaScript for the Back End. I can't use ES6 either as Rhino just have minimum support of it.

Any idea how could I approach this issue?

1

There are 1 best solutions below

0
Belakorr On

After some trouble basically there's a built-in function 'encrypt', included at dw/crypto/Cipher, that even though documentation doesn't mention it, you can do 3DES encryption, this would be the algorithm necessary to specify: 'DESede/CBC/PKCS5Padding' apply any padding or variation necessary.