Answer the question
In order to leave comments, you need to log in
How to convert id in int64 to id with 11-12 characters?
The database stores id - int64. I want to have an id in the url on the UI in the format "8STmsLOBdgU", that is, like on youtube.
I want to store additionally this long id. That is, I want to encode / decode on the fly.
How to encode/decode id int64 into id in "8STmsLOBdgU" format? That is, 11-12 characters. What algorithm or crypto function to use?
Answer the question
In order to leave comments, you need to log in
https://de.wikipedia.org/wiki/Base62
https://en.wikipedia.org/wiki/Base58
The second one is more human friendly.
A ready-made encoder is not a problem to find for any popular language.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question