Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- A quickie - field size of php session id
September 2, 2005, 10:22 pm
rate this thread
Re: A quickie - field size of php session id
settings session.hash_function and session.hash_bits_per_character
(unless you've overriden these somewhere else).
With the default of md5 and 4, you would get a 32-character hex string
(128 bits / 4). When using sha1, you'll get a 40-character hex string
(160 bits / 4).
The cool thing about that is the fact that the session id's are exactly
the same length every time -- 128-bits for example. So, if you wanted
to, you could probably make the column a fixed-length binary field
that's exactly the right length.
- » Using preg_replace to convert '<?php*?>' to nothing (removing all PHP code)
- — Previous thread in » PHP Scripting Forum