[pmwiki-users] DBAuth addition to AuthUser.php . . .

Joachim Durchholz jo at durchholz.org
Thu Jul 21 11:07:02 CDT 2005


Benjamin Wilson wrote:

> Patrick R. Michaud wrote:
> 
> Database stores as char (32, I think).

This depends on the kind of encryption/hash in use.

mySql encryption functions use these sizes:
   ENCRYPT: system-dependent (uses Unix standard lib)
     On some Unixes, this means "essentially unlimited".
     (The result isn't a constant-length hash, it's the encrypted
     password. And the maximum password length can be anything,
     even kilobytes if people really want that.)
     In other words, you'd want to set an arbitrary maximum
     length.
     This function is also available as crypt() in PHP.
   MD5: 16
     This function is also available as md5() in PHP.
   OLD_PASSWORD (available since 4.1): 16
   PASSWORD: 16 before mySql 4.1, 41 after 4.1.
   SHA1: 20

Sizes are given in bytes. If the string is encoded in hexadecimal, the 
size doubles.

HTH
Jo




More information about the pmwiki-users mailing list