How to generate account number?

GangGreene GangGreene at example.com
Fri Nov 2 18:02:09 EDT 2012


On Sat, 03 Nov 2012 00:13:19 +0300, Andriy Kornatskyy wrote:

> Requirements for `account number` generator:
> 
> 1. Issue pseudo random consistent number (must be unique for dozen
> millions of records)
> 2. Easy check validity (without a need to make a database call)
> 
> Interested? Read more here:
> 
> http://mindref.blogspot.com/2012/11/generate-account-number.html
> 
> Comments or suggestions are welcome.
> 
> Thanks.
> 
> Andriy Kornatskyy

generate sha1sum on the ((key database record(s))+date+timeofday)
Should be unique for billions/trillions of records.



More information about the Python-list mailing list