Solved

Encrypt or hash data giving a fixed digit numeric result?

Posted on 2002-05-15
2
187 Views
Last Modified: 2008-03-03
Im looking for a way to take a string and hash it to a unique number of a fixed size.  ie 6 digits.

I want to use this as key and then rehash the number 1 more time and produce another 6 digit number as the unlock code.  

the original string will be either variable in length or I can fix it to to a set number of characters but variable would be best.

the results of both hashes must be numeric and fixed length.

thanks for the help
0
Comment
Question by:ocsscott
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 200 total points
ID: 7011280
A CRC check may be enough to do this for you http://www.freevbcode.com/ShowCode.Asp?ID=2755 is an example of this, you could easily convert the output to a long rather than a hex string and use this as your number, it will commonly be 10 digits but you could use perhaps the last 6 if required.
0
 

Author Comment

by:ocsscott
ID: 7012272
perfect, that will do the trick

scott
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question