Solved

Encrypt or hash data giving a fixed digit numeric result?

Posted on 2002-05-15
2
183 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
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now