GUID is big random number show in a HEX basis. I want to show this number in a shorter format, lets say that based on the all letters and numbers. That is a 36 basis.
Lets say that: 2f1e4fc0-81fd-11da-9156-00036a0f876a
will become as 3jEl9x6eZi
.
Is there any 'ready' algorithm for this in .Net?
it need to be bidirectional.
Edit: using Base64 is even better solution. The only problem is Base64 contains /
char which is not compatible to use in URI.
I think the closest that you will find is Base36 however it won't work with a GIUD type (only an Int16, Int32, or Int64).
Maybe this is what you need: ShortGuid - A shorter and url friendly GUID class in C#
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With