What is wrong with 16 bytes? You could always use substr {ducks for cover}
Why duck for cover? It's exactly what he should do. Digest::SHA1 is an excellent hashing algorithm that produces a 160 bit hash. If that's "too big" (for some curious reason) then take the first 10 bytes of an SHA1 hash; you'll have an excellent hashing algorithm that produces a 80 bit hash. The only downside is that the chance of colissions is much much higher.
BTW, you may note I've changed the subject line since SHA1 is not an encryption module; and I might also add that if the author doesn't know the difference between encryption and hashing, he probably shouldn't be doing either but instead read up on cryptography.
Using crypto the right way is hard, I can highly recommend you read some of Bruce Schneier's publications, such as Security Pitfalls in Cryptography and Why Cryptography is Harder than it Looks.
In reply to Re: Re: Alternative Perl hashing module
by xmath
in thread Alternative Perl encryption module
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |