in reply to Perl sources and crypt()

I can't imagine actually using crypt(). If I want a hash then I turn to Digest::SHA1 (or the deprecated Digest::MD5). If I want to encrypt data then Crypt::CBC plus something like Crypt::Blowfish. But crypt()? Nah.


Seeking Green geeks in Minnesota

Replies are listed 'Best First'.
OT: alternatives to hashing
by John M. Dlugosz (Monsignor) on Feb 22, 2003 at 00:01 UTC
    Do you know of a list/summary of different "digest"/checksum algorithms? Not just cryptographic one-way, but things like CRC-32 also.

      No. I keep track of what I need - I guess if I wanted a crc then there's function for that under the unpack() function. But I've never wanted to do a plain crc32 - when I care about data integrity I use both md5 and sha1 (mostly just for redundancy). I wish I had better info for you.

Re: Re: Perl sources and crypt()
by Anonymous Monk on Feb 21, 2003 at 08:05 UTC
    I can't imagine actually using crypt()...

    So? You completely missed the point.

      If not, way not change this in the future and put the file needed for crypt(), since is a useful function for passwords, specially on web.
      I can't imagine actually using crypt()...
      So? You completely missed the point.

      No I didn't. If the point is to work with crypted passwords then the digest functions I mentioned blow this out of the water. If the point is to work with a passwd file then there are modules for that (but never having actually written anything to muck with /etc/passwd or /etc/master.passwd I don't know their names). Or then there is Apache passwd file - but there's a module for that.


      Seeking Green geeks in Minnesota

        Yes you did. crypt is a builtin perl function. Because of the reasons gmpassos lists, there is no reason not to include the sourcecode to crypt with the perl source.

        It has nothing to do with actually using crypt as a form of encryption over SH1 or whatnot (it's not about cryptograpy, but about including the sourcecode for a builtin perl function).

        Get it now? -- BTW, best form of encryption is a bitwise or (it's not, but who cares, that's not at argument here)

        And if you are dealing with /etc/passwd, then you already have a library that contains crypt(), so you don't need to get one 'by hand'. If you don't have a library that contains crypt, then where did the passwords in /etc/passwd come from?