I got a task where I need to write a encoder with these requirements:
- Input: an integer varying from 1 up to 8 digits (i.e. 12345678, 2352, 76543)
- Output: a fixed size 6 digits code that could contain any alphanumeric and symbols (a-z, A-Z, 0-9, !@#$%*()|-_=+^/?)
- The operation must be reversible, so given a code it should decode back to the original integer
- There's no need for the output code to be cryptographicaly safe
I have no experience with crypto(?) or encoding algorithms so I have no clue how to get this job done. The libs I found online doesn't allow to set the output size since it's based on input size.
Any help is strongly appreciated, I'm lost here