I'm trying to generate a key for decoding a password that has been encrypted using ColdFusion. Im getting different result when im passing param in binaryDecode(string, "hex")
. How do I translate this into JavaScript?
in ColdFusion:
binaryDecode("CA993CED42F374C9291FC2484495CD9334E8C822", "hex")
output is: -54-10360-1966-13116-554131-627268-107-51-10952-24-5634 (binary)
after that the output will be looped and store in array variable
then binaryEncode(javaCast("byte[]", arrayVariable), "Base64")
the result is generatedKey
in Node js:
i didnt get the same output after the binaryDecode
43413939334345443432463337344339323931464332343834343935434439333334453843383232
I tried using `buffer.from()` but it just split to `43 41 39` etc.
I've tried so many things but I'm unable to get that -54-10360-1966-13116-554131-627268-107-51-10952-24-5634
result