using php to create a joomla user password?

前端 未结 5 671
逝去的感伤
逝去的感伤 2020-12-09 12:52

I\'m trying to create a custom registration component for Joomla, and I was wondering if anyone knew how to create the correct password encryption for joomla? Joomla passwor

5条回答
  •  再見小時候
    2020-12-09 13:28

      //function to encrypt the string
        function encode5t($str)
        {
          for($i=0; $i<5;$i++)
          {
            $str=strrev(base64_encode($str)); //apply base64 first and then reverse the string
          }
          return $str;
        }
    
        //function to decrypt the string
        function decode5t($str)
        {
          for($i=0; $i<5;$i++)
          {
            $str=base64_decode(strrev($str)); //apply base64 first and then reverse the string}
          }
          return $str;
        }
    

    In this function, i’ve encrypted the string 5 times with base64_encode and reversing the string with strrev() and for decrypting 5 times by reversing the string first then applying base64_decode() .

提交回复
热议问题