[AccessD] Hashing a name to build a unique number

Wortz, Charles CWortz at tea.state.tx.us
Fri Feb 21 14:53:00 CST 2003


John,

You can build your own easily.  One possibility is:  [Ascii code of
first letter] + 100 * [Ascii code of second letter] + 10000 * [Ascii
code of third letter] + ...

Charles Wortz
Software Development Division
Texas Education Agency
1701 N. Congress Ave
Austin, TX 78701-1494
512-463-9493
CWortz at tea.state.tx.us
(SELECT * FROM users WHERE clue > 0)


-----Original Message-----
From: John W. Colby [mailto:jcolby at colbyconsulting.com] 
Sent: Friday 2003 Feb 21 14:38
To: AccessD
Subject: [AccessD] Hashing a name to build a unique number

I have run into several places where it is useful to build a user a fake
SSN if we don't know their ssn.  To this point I have just used "FAKE" &
XXXXXXX where XXX is a random number I just make up using rnd.

I think the idea would be more useful if I could design a hash algorithm
that builds the XXXX number out of say their first and last name.  That
way the number would be pseudorandom, yet I could build the same number
if ever called to again.

An example use - a client gets spreadsheets of members that they want to
add to their db.  The spreadsheet has the SSN of the person's SPOUSE,
but not the ssn of the person.  Obviously I don't have a field for
spouses ssn (though this is getting to be a big enough issue as to need
one!)  If I could generate a fake ssn with a decent hash that left me
with a pretty good random like number, I could place in the record being
generated.  That person would not come in again if I tried to import
again later, or if another spreadsheet contained that same person.

So, does anyone have such an algorithm for using text strings to
generate hash numbers?

John W. Colby
Colby Consulting
www.ColbyConsulting.com



More information about the AccessD mailing list