in reply to Re: Alternative Perl encryption module
in thread Alternative Perl encryption module

Given these digest methods, only binary format seems suitable for your needs... does anybody know of other algorithms?

Speaking about needs, why is it important that the digest be at most 10 bytest in length, anyway? I quite seriously don't think there is a widely-used, well-known digest function that uses only 10 bytes, especially since longer digest sizes are usually considered to be a good thing.

Maybe the original author could provide some background on this.

--
mowgli

  • Comment on Re: Re: Alternative Perl encryption module

Replies are listed 'Best First'.
Re: Re: Re: Alternative Perl encryption module
by hardburn (Abbot) on Mar 10, 2003 at 15:05 UTC

    Without looking at the subject, I would assume that the author needs a hashing algorithm, but not for cryptographic purposes. In which case, a smaller hash is just fine as long as you know how to take care of collisions (the book "Intro to Algorithms" handles this by putting colliding data into a linked list which is walked through to find the specific entry you need).

    But since the subject specifies encryption, I would say the author needs to research more about cryptography.

    ----
    Reinvent a rounder wheel.

    Note: All code is untested, unless otherwise stated

      *nods* In case cryptographic strength is not needed, one might just use an SHA-1 mac and cut it in half, so to speak; I have no idea what conditions would still hold with regard to the absence of collisions if one did that, but depending on the problem at hand, it might be worth looking into.

      --
      mowgli