According to this RFC: http://www.faqs.org/rfcs/rfc3548.html base 16
encoding is synonymous with plain old ASCII hex digits (makes sense!).
It seems to me you should be able to use any number to hex character
conversion function available in PHP--but I am neither a PHP or SHA
expert...
On Wed, 2009-11-11 at 05:46 -0600, Chris McQuistion wrote:
> Anyone out there know how to change the following part of a PHP script
> so it is creating SHA base16 passwords, instead of SHA base64?
>
>
> Chris
>
>
> /**
> * Calculates SHA password.
> *
> * @access private
> * @return string SHA password
> */
>
>
> function _CalculateShaPassword($password)
> {
> if (COMMON_DEBUG_MODE)
> self::Log(COMMON_DEBUG, "called", __METHOD__, __LINE__);
>
>
> return base64_encode(pack('H*', sha1($password)));
> }
>
>
> /**
>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"NLUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nlug-talk?hl=en
-~----------~----~----~----~------~----~------~--~---