1

We have a working code in Java that decrypts an encrypted string, and it gives us back the byte array.

byte[] decode = null;
decode = Base64.decode(encryptedString);

We need an equivalent version in client side: javascript. Are there any available libraries?

Thanks!

lorraine batol
  • 6,001
  • 16
  • 55
  • 114

1 Answers1

2

It turns out our code in crypto works fine, its return is on hex format however, and when we converted our byte[] in java code to hex, they turned out to be equivalent:

CryptoJS.enc.Base64.parse(encryptedString);

Lesson learned: On java it dealt with byte[] mostly, but on Crypto it makes use of hex.

lorraine batol
  • 6,001
  • 16
  • 55
  • 114