Hi all,
I've implemented a small routine that generates "ID" numbers in hexadecimal
format. Does anyone know of any routines to generate a unique check digit
for a hexadecimal number? I've found several ways to do it in Base 10, but
not so much for hex. I really like the UCC mod 10(3) methods, but the check
digits are fairly linear in progression when I try to apply it to hex.
Here's an example of the types of ID's I'll be generating:
B951-D300-1E73-C1xx
Note that the dashes are just to "prettify it", and can be ignored for my
purposes. "xx" represents a placeholder for the 2 hexadecimal check digits.
B951D3001E73C1xx
Thanks. Any help is appreciated.Michael,
Do you need the check digit for more than
catching transcription or typing errors? Is there
a reason "fairly linear" in progression is not acceptable?
Steve Kass
Drew University
Michael C# wrote:
>Hi all,
>I've implemented a small routine that generates "ID" numbers in hexadecimal
>format. Does anyone know of any routines to generate a unique check digit
>for a hexadecimal number? I've found several ways to do it in Base 10, but
>not so much for hex. I really like the UCC mod 10(3) methods, but the chec
k
>digits are fairly linear in progression when I try to apply it to hex.
>Here's an example of the types of ID's I'll be generating:
>B951-D300-1E73-C1xx
>Note that the dashes are just to "prettify it", and can be ignored for my
>purposes. "xx" represents a placeholder for the 2 hexadecimal check digits
.
>B951D3001E73C1xx
>Thanks. Any help is appreciated.
>
>|||Like you mentioned, catching transcription errors is part of it; I also
don't want people to be able to reverse engineer and guess the previous ID
code; for instance, if the code ends with -C1B6, I don't want them to be
able to take a wild guess at -C0B5 being the previous ID.
Thanks
"Steve Kass" <skass@.drew.edu> wrote in message
news:OYxYyK7SFHA.3696@.TK2MSFTNGP15.phx.gbl...
> Michael,
> Do you need the check digit for more than
> catching transcription or typing errors? Is there
> a reason "fairly linear" in progression is not acceptable?
> Steve Kass
> Drew University
>
> Michael C# wrote:
>sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment