…
Base62 Encoder transforms a string so that it conforms to the Base62 Data Encodings specification.
Base62 is not for encryption purposes and is not secure. It is an encoding mechanism only.
Base62 is a collection of encoding and decoding techniques that convert data between binary (hexadecimal) and alphanumeric text formats (ASCII). Base62 allows for data compression, is simple to recognize, and can be used to build an anti-auto-monitoring encoding method for transmission systems. However, the absence of verification renders it incapable of identifying transmission errors.
Base62 encoded data is a string of character that contains only a-z, A-Z, 0-9. The string contains text-printable characters.
alphanumeric = 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
Base62 can encode any binary data! Since binary data, typically unreadable by humans, is the result of most cryptographic operations, an encoding strategy is required to convert the zeroes and ones into something that can be recorded or shared with others.
When converting a Base 10 integer to its Base 62 encoding, URL shortening often uses the Base62 encoding. Base62 is similar to Base64, except that it does not have the +, /, and = symbols. Base62 comprises 62 characters, 26 upper letters from A to Z, 26 lower letters from a to z, and 10 integers from 0 to 9.
Many URL shorteners use a Base 62 algorithm.
The technique for Base62 encoding as follows:
Decoding then becomes:
The 62 digit long alphabet to use is equal to
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
'
[{ins-quote}]
Before software can be reusable it first has to be usable.
Ralph Johnson
…
…