Re: integer sequence randomization
- From: Unruh <unruh-spam@xxxxxxxxxxxxxx>
- Date: Wed, 29 Oct 2008 16:23:58 GMT
"tomas.kejzlar@xxxxxxxxx" <tomas.kejzlar@xxxxxxxxx> writes:
Hi,
I am facing the following problem: I have a database filled with
thousands of records (tickets) distinguished by ther ID. I need to
find a way to generate unique but random integers, preferably based on
IDs of the records and these will work as barcodes (they have to be
"random" so that anyone having one ticket could not guess what is the
other barcode). We've tried generating random numbers and then
checking them against the ones we already have in our database, but
this (obviously) is getting slower and slower as the database is
getting bigger.
I've tried to investigate some possibilities of "randomizing" IDs
according to given rules (1 becomes 3,...), but the resulting sequence
is not "random" enough. Can anyone point me to a possible solution?
You do not say anything about the length, but simply encrypting the IDs
would work (with a secret key) Of course with say DES, this would result in
numbers of length about 19 digits for the bar codes. Is that OK?
Note that searching the database is not the best procedure. Sort the
database and store that in doing your search. Then the search takes log
time.
Thanks very much, Tom..
- References:
- integer sequence randomization
- From: tomas.kejzlar@xxxxxxxxx
- integer sequence randomization
- Prev by Date: Re: What is a (sci.crypt expert) ?
- Next by Date: Re: What is a (sci.crypt expert) ?
- Previous by thread: Re: integer sequence randomization
- Index(es):
Relevant Pages
|