> ok, sorry for my strictness...
>
> I need create some codes with fixed lenght with deny of ability of other
> people to create such identifiers...
>
> Something similar to phone cards with ID, which I must enter into phone
> before I dial phone number and going to talk...
>
> The code should be i.e. 16 or less characters long. But all codes with
> fix lenght.

        You can do no better than to make all the codes truly random. This, of
course, requires a central database to validate the codes.

        If this is unacceptable, you can split the code in half. The first half is
a sequence, the second half a checksum. The checksum is computed by a hash
on the sequence along with a secret key. You can then validate the code by
concatenating the sequence with the secret key, computing the checksum, and
comparing to the second half.

        If it's like a phone card, you need the central database anyway. Otherwise
how do you know if the card has already been used or used up?

        Again, if this doesn't meet your requirements, you'll have to do a better
job of telling us what they are.

        DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to