N
N
Nikita K.2014-07-24 12:09:29
Algorithms
Nikita K., 2014-07-24 12:09:29

How to generate string by id?

Hello! Tell me please. There is a user with an id assigned to him (for example, 10 digits). It is necessary to get a unique string of letters and numbers of greater length (about 200). It is necessary that at any time this line could be obtained knowing only the user id, without resorting to the database.
I thought in the direction of hash functions in order to get a unique number, but I don’t understand what to do with it further.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Petrikov, 2014-07-24
@bonilka

Yes, even like this:
or any other logic with hashes, knowing the salts and the initial ID, you can always restore this string.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question