Skip to content
Advertisement

PHP XOR Decryption

I have an encrypted parameter V coming from a web page like this:

JavaScript

V is encrypted like above:

MD5 :

JavaScript

XOR :

JavaScript

which gives something like:

JavaScript

what I want here is the function to decrypt this ‘ecryptedXOR‘ using the password, so that I can get the:

JavaScript

here’s what I’ve done so far: http://pastebin.com/D9mzx82Q

Advertisement

Answer

You can XOR by the same “password” to get the original string.

Edit :

from Wikipedia:

a string of text can be encrypted by applying the bitwise XOR operator to every character using a given key. To decrypt the output, merely reapplying the key will remove the cipher.

So if your obj.XOREncryption() is doing nothing extra but a simple XOR, by applying the same operation a second time you’ll get the original text :

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement