Anyone dealt with mcrypt and tripleDES before??
I'm having an issue where I'm trying to decrypt a cookie string that was created with TripleDES by another host (an ASP site I think). (I'm developing a sub-domain site)
I have the Key, it's a 16 character word.
The process that has been used is that the key is converted from ASCII to HEX before being used in the encrypt process.
The process of convertion means that the Key is now 32 characters long.
Unfortunately, it appears that a 32 character Key is too long for the MCRYPT_TRIPLEDES algorythm. I get an error message telling me so. Having done some research I've found that mcrypt_decrypt() 's maximum key length for MCRYPT_TRIPLEDES is 24 characters. Indeed, when I shorten the key to 24 characters I get the same result, but shorten to anything else and the output changes. So I assume the function just automatically uses the first 24 characters supplied to it as the key.
So - what I want to know is:
Does the TripleDES algorythm have this limitation across all coding systems?
If so - how on earth has this 16character Key been successfully used by other coders (which apparantly is the case - albeit non php)
How else can I attemtp to convert this 16 character Key into a 24 character string that wil match the other incarnations??
I seriously hope that someone can help, as I'm getting to the hair-tearing stage now!! :queasy::queasy: