From owner-freebsd-questions Thu Feb 5 19:57:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA14995 for questions-outgoing; Thu, 5 Feb 1998 19:57:30 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from serv01.net-link.net (serv01.net-link.net [205.217.6.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA14981 for ; Thu, 5 Feb 1998 19:57:23 -0800 (PST) (envelope-from wpub1@net-link.net) Received: from dimension (pm201-27.bc [207.49.227.127]) by serv01.net-link.net (8.8.8/8.6.9) with SMTP id WAA12955 for ; Thu, 5 Feb 1998 22:57:21 -0500 Message-Id: <3.0.1.32.19980205225320.00698648@smtp.net-link.net> X-Sender: wpub1@smtp.net-link.net X-Mailer: Windows Eudora Pro Version 3.0.1 (32) Date: Thu, 05 Feb 1998 22:53:20 -0500 To: freebsd-questions@FreeBSD.ORG From: Matthew Hagerty Subject: MD5 or Crypt? Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe questions" 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 ---------------