Summary
Create the encoder/decoder specifying all options manually.
Syntax
public Base32Url(bool padding, bool caseSensitive, bool ignoreWhiteSpaceWhenDecoding, Base32Url.CharMap[] alphabet)
Parameters
Name |
Type |
Description |
padding |
bool |
Require/use padding characters? |
caseSensitive |
bool |
Be case sensitive when decoding? |
ignoreWhiteSpaceWhenDecoding |
bool |
Ignore / allow white space when decoding? |
alphabet |
Base32Url.CharMap[] |
Alphabet to use (such as Base32Url.Base32CrockfordHumanFriendlyAlphabet) that decodes multiple characters with same meaning (i.e. 1,l,L etc.).
The array must have exactly 32 elements. EncodeTo in each CharMap is the character used for encoding.
DecodeFrom in each CharMap contains a list of characters that decode. This allows you to decode 1 L l i and I all as having the same meaning.
The position in the array of CharMaps is the binary "value" encoded, i.e. position 0 to 31 in the array map to binary nibble values of 0 to 31.
NOTE: an alphabet such as crockford may result in a case insensitive decoding of text, but case SENSITIVE must be specified as true in cases
like this to provide a unique mapping during decoding, thus to create a crockford style map you must always include the upper and lower
decode mappings of any case insensitive decode characters required.
|
Return Value