Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Feb 1998 22:53:20 -0500
From:      Matthew Hagerty <wpub1@net-link.net>
To:        freebsd-questions@FreeBSD.ORG
Subject:   MD5 or Crypt?
Message-ID:  <3.0.1.32.19980205225320.00698648@smtp.net-link.net>

next in thread | raw e-mail | index | archive | help
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.

Thank you,
Matthew

---------------
Matthew Hagerty
wpub1@net-link.net
---------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.1.32.19980205225320.00698648>