Jump to content

php_king

New Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by php_king

  1. Thanks, that was my problem. I forced the page to refresh
  2. Hello all, I have a slight problem with my coding on a login script. The login script basically encrypts the users username, password and ID in a cookie with this function: function encrypt($text){ return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, SALT, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)))); } and then when I try to retrieve the same value after setting with this function: function decrypt($text) { return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, SALT, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))); } It first gives me this output: t¨‘žÃŽ^kè¦Ü=yà¸ìŸ2Œ£· _¢Ó But when I refresh the page, it gives me the correct output that I wanted. From the looks of it, it looks like it's compressed. I cannot find anything on google about it and I feel lost as to what to do. Help me plz
  3. Well, I'd consider 126M to be high, but it all depends upon what your scripts are doing.
  4. In my opinion, I wouldn't even use an MD5 just because it is the most common function that users try to crack. I would suggest a SHA instead
  5. After searching and experimenting, I believe that what you need in order for it to display correctly when you call it from the database is the function: stripslashes()
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.