I have tried making a encoding Code function by myself, it worked good but it would be impossible to decode as I used alot of % values (sorry I don’t know what to call them).
(if you were wondering, the available letters are A-Z and 0-9, aka “0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZâ€.)
The code would also be formatted like this: ABC-DEF-GHI, and it would start from the left side and fill up (example: id : 1, code “A00-000-000â€, id : 100, code “G1L-200-000â€, id : 10000, code “6MV-SMZ-TL1â€)
Again, the encoding function is easy but the decoding function is hard due to the repetitives.
Also another thing I don’t really want is too many same letters, for example “AAA-A41-0ZNâ€, so I want it to be truly random but also kinda… not. (because I said earlier that I don’t wanna use math.random() functions)
Would be nice if I could get this done or get suggestions on what encoding / decoding functions I could use
1 post - 1 participant