Re: Basic Authentication
| From: | Andrew Ballard | Date: | Wed, 14 Jan 2009 19:58:21 +0000 |
| Subject: | Re: Basic Authentication | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-286347@lists.php.net to get a copy of this message | ||
On Wed, Jan 14, 2009 at 2:34 PM, tedd <tedd.sperling@gmail.com> wrote:
>> What it is depends on what encryption routines you have installed.
>>
>> The algorithm to authenticate detects the algorithm based on the hash.
>>
>> 32-char : MD5
>> $1$ : SHA-1
>> $2$ : SHA-2
>> etc.
>> (Apologies if I got my tokens/algorithms wrong)
>>
>> If you just toss MD5s in there, it should work, I think, if you have MD5
>> installed and available.
>>
>> It picks the best available when it adds a new entry.
>>
>> So an old file might look like:
>>
>> #your box came with MD5 installed
>> joe:MD5
>> alice:MD5
>> #you installed SHA-2
>> bob:SHA-2
>> lee:SHA-2
>>
>> At least, that's been my experience so far...
>
>
> The problem I have is that the sever I'm working on is not mine, thus no way
> for me to get shell access.
>
> I assumed that the server used a different encoding than MD5 because the
> string it generates is very short, such as:
>
> jYYjNLrifgUxk
>
> Clearly this is not MD5 encoding and thus the reason for my original post.
>
> I do have before and after examples I could use to identify what algorithm
> was used. I just need to know what algorithms could have been used and (if
> it's not too much to ask) working example of each.
>
> Cheers,
>
> tedd
>
So can you not just use PHP's crypt() function? It doesn't require
shell access, and like I said - it worked fine for me the last time I
used basic auth.
Andrew