Date: Sun, 8 Feb 1998 22:52:26 -0800 (PST) From: Doug White <dwhite@gdi.uoregon.edu> To: Matthew Hagerty <wpub1@net-link.net> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: MD5 or Crypt? Message-ID: <Pine.BSF.3.96.980208225006.24904j-100000@gdi.uoregon.edu> In-Reply-To: <3.0.1.32.19980205225320.00698648@smtp.net-link.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 5 Feb 1998, Matthew Hagerty wrote: > Greetings, > > Could someone shine some light my direction regarding MD5? I'm running > FreeBSD 2.2.5-release, USA. I am trying to make a one way hash to store my > companies credit card numbers. I need to be able to verify a credit card > but I don't want to store them in plain text. I need something similar to > a password file for credit card numbers, that way I could hash the card > being looked for and compare the hash values. > > Is MD5 a better choice than Crypt for this? Can I trust that the MD5 > output will be unique for a given input (since the input will only be 12 to > 16 characters, not huge files)? Also, is there a MD5 function like crypt() > that I can call from inside my programs (C/C++)? I've poked around the man > pages and the handbook, but I cannot find anything very specific. See crypt(3); if you preface the salt with `$1$' you will get an MD5 encrypted value back rather than DES. If the DES package isn't installed you get MD5 whether you want it or not. Don't forget to build with `-lcrypt'. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980208225006.24904j-100000>
