Results 1 to 4 of 4

Thread: Generate a check digit (3 figure)

  1. #1

    Thread Starter
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774

    Generate a check digit (3 figure)

    I have a three figure ID code that users enter. (Less than one thousand) this integer number must be passed to the function and a check code returned.

    This code must be vertually unguessable and very unlikely to be entered by accident.

    This is part of a security system for signing up new users.

    Any ideas for a good formula? It's got to stop the user from useing the softwear with out phoneing head office for their unique ID.

  2. #2
    Hyperactive Member marnitzg's Avatar
    Join Date
    Oct 2000
    Location
    South Africa
    Posts
    372
    If its only 3 digits you could use a hash. Something like MD5 maybe.

  3. #3
    Fanatic Member sql_lall's Avatar
    Join Date
    Jul 2002
    Location
    Up Above (i.e. AUS)
    Posts
    571

    Talking well...

    How many 3-digit IDs do you need?
    I mean, if you want 1000 of them, then ur outa luck

    But, if you only are wanting to have around 10 or less, then you could just convert the base of the 3-digit number (i.e. pass 137 (base 10) and function spits out whether 137 (base 26) is divisible by some number)

    Otherwise, you could just have an array of numbers which are IDs, and check it against this. This would be truly unguessable, as you yourself made them.
    sql_lall

  4. #4

    Thread Starter
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774
    Sigh... you could be right (both)...

    What I was looking to try and do ammounts to an unlock key based on the F_id which would (should) be unique per user as it is assigned by HO at distribution time.
    ?
    'What's this bit for anyway?
    For Jono

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width