Re: New hash function: avalanche

From: Michael Amling (nospam@nospam.com)
Date: 02/20/03


Date: Thu, 20 Feb 2003 00:07:55 -0600
From: Michael Amling <nospam@nospam.com>

Benjamin Goldberg wrote:
>
> char * Avalance(char *input, int inlen) {
> static char output[16];
> char aybabtu[16] =
> {65,76,76,32,89,79,85,82,32,66,65,83,69,33,33,33};
> [...]
> for( i = 0; i < input; ++i ) output[i] = ~aybabtu[i];
> } else {
> for( i = 0; i < input; ++i ) output[i] = aybabtu[i];
> }
> return output;
> }
> [untested]
>
> This will produce the EXACT same output as your function did, but much
> much faster.

   But you've taken most of subtlety out of the joke.

   I presume that "ALL YOUR BASE!!!" is an allusion to a television
program I have not seen.

--Mike Amling



Relevant Pages