Convert ten character classification string into four character one in C#
- by mare
What's the best way to convert (to hash) a string like 3800290030, which represents an id for a classification into a four character one like 3450 (I need to support at max 9999 classes).
The hash needs to be unique and always the same for the same an input.
If possible, the hash should also be reversible (but this is not required).