On Thu, May 22, 2008 at 12:14 PM, GTXY20 <[EMAIL PROTECTED]> wrote: > Hello all, > > I will be dealing with an address list where I might have the following: > > Name SSN > John 111111111 > John 111111111 > Jane 222222222 > Jill 333333333 > > What I need to do is parse the address list and then create a unique random > unidentifiable value for the SSN field
> The unique random value does not have to follow this convention but it needs > to be unique so that I can relate it back to the original SSN when needed. > As opposed to using the random module I was thinking that it would be better > to use either sha or md5. Just curious as to thoughts on the correct > approach. How are you relating back to the SSN? Are you keeping a cross-reference? If so, you might just assign sequence numbers for the unidentifiable value. If you want the key itself to be convertable back to the SSN (which wouldn't work with random values) you will need some cryptography. If you want a unique key that won't collide with other keys then sha or md5 is a better bet than random. Kent _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
