I need to identify an entity using a 12-characters length string, containing only digits and letters (case insensitive) and I want to squeeze the max number of possible key values.

I.E. JH45KJ2H2313

I know that I can use hex encoding (0-9, A-F, 4 bits per char => 2^48 values) I think I have to exclude base64 because it includes 2 extra chars (+ and / usually).

I think there is a better way of using the space. I.e. if 1 use 0-9 + AZ I can store 36 values ~ 4 bits in a char.

Is there an encoding standard or I need to implement the encoding/decoding myself?

没有正确的解决方案

其他提示

The short answer: There is no Base36 implementation in the BCL. You have to do it by yourself or get it from elsewhere.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top