0
There is a way to use RC2 encryption through some Javascript function?
I’m making a mobile application where her 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. o Problem is that the result it returns to me I cannot 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>
var VALUE = "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?
How about using this library?
– Omni
I’m studying this to Cryptojs, but I’m not getting the result I’m looking for...
– LeandroLuk
You should then ask your question what you have already tried, what you have used and what difficulties you have encountered in getting help and not making repeated suggestions (for example, what is your problem with Cryptojs?)
– Omni
@Omni put the data I need to return, in the issue of the question. could help me please?
– LeandroLuk
From what I understand your problem is no longer encryption, but converting encrypted text to hexadecimal?
– Omni
probably yes, I have never worked with cryptography before, the sector that is doing my webservice needs me to send a variable with the value of the result so that it can validate my AJAX requests. and the Value variable is the key of each application.
– LeandroLuk
Let’s go continue this discussion in chat.
– Omni