Re: Re: sha256(), sha256_file(), and other hashing algos
| From: | Wez Furlong | Date: | Fri, 18 Nov 2005 20:55:51 +0000 |
| Subject: | Re: Re: sha256(), sha256_file(), and other hashing algos | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20173@lists.php.net to get a copy of this message | ||
Assuming that sha256 is always going to be the best default is pretty
short-sighted.
It's only a matter of time before that one is partially broken in some
way too; we won't be able to change the default value of the function
by then, because everyone using the default will have code that
depends on sha256, and voila, we've gotten locked into something that
might not be so desirable.
Default values should be avoided unless they're *always* going to make sense.
--Wez.
On 11/18/05, Roman Ivanov <gamblergluck@yahoo.com> wrote:
> Sara Golemon wrote:
> > string hash(string $algo, string $value[,$raw=false])
> > string hash_file(string $algo, string $filename[,$raw=false])
>
> Hm... hash(string $value[, $algo='sha256' [,$raw=false]])?
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>