For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > November 2005 > PASSWORD function in MySQL









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PASSWORD function in MySQL
thehuby

2005-11-17, 6:57 pm

How big should a password field be in a table when using the MySQL
PASSWORD function?

Can I calculate how big the hashed value will be (in terms of number of
characters) if I limit the user to say 16 character passwords?

Thanks,

Rick
www.e-connected.com

J.O. Aho

2005-11-17, 6:57 pm

thehuby wrote:
> How big should a password field be in a table when using the MySQL
> PASSWORD function?
>
> Can I calculate how big the hashed value will be (in terms of number of
> characters) if I limit the user to say 16 character passwords?


It will 16 characters.


//Aho
J.O. Aho

2005-11-17, 6:57 pm

thehuby wrote:
> How big should a password field be in a table when using the MySQL
> PASSWORD function?
>
> Can I calculate how big the hashed value will be (in terms of number of
> characters) if I limit the user to say 16 character passwords?


Mysql < 4.1 --> 16 bytes
Mysql >=4.1 --> 41 bytes

If you want to limit the size of the typed password, you need to do that in
the php code, but even if it's just one character long the has value will be
16 (or 41) bytes long.


//Aho
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com