Encrypting a String for RC2 in JavaScript

0

Is there a way to use RC2 encryption through some JavaScript function?

I'm making a mobile application where its validation token needs to be through this encryption because the rest of the system already uses it.

EDITED

Through a comment below (made by @Omni), I found the CryptoJS library where it encrypts to RC2. the problem is that the result it returns I can not handle the same for a binary string. I have the following values:

<script src="https://rawgithub.com/tomyun/crypto-js/xeit-3.1.2/build/rollups/rc2.js"></script><script>varVALUE="29udbAj%(y4";
    var KEY = "M^$UCLThSEZGnet";
    var KEYSIZE= 64;

    var e = CryptoJS.RC2.encrypt(VALUE,KEY,{effectiveKeyBits: KEYSIZE});
    var d = CryptoJS.RC2.decrypt(e,KEY, {effectiveKeyBits: KEYSIZE});
    /*
        preciso retornar o resultado = '95817E9B4F230CD37EB564BD13BB568F'
    */
</script>

How do I get to the above result?

    
asked by anonymous 29.04.2015 / 13:39

0 answers