Ξυ³h$ΌaΉNλ      !"#$%&'()*+,-./0123456789:;<=> ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j (c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore  ExperimentalportableNone Ηαμkbase64ΕGiven a bytestring, check to see that it conforms to a given alphabetlbase64;This function checks that the last char of a bytestring is '='Α and, if true, fails with a message or completes some io action.This is necessary to check when decoding permissively (i.e. filling in padding chars). Consider the following 4 cases of a string of length l:Νl = 0 mod 4: No pad chars are added, since the input is assumed to be good. l = 1 mod 4: Never an admissible length in base64 l = 2 mod 4: 2 padding chars are added. If padding chars are present in the string, they will fail as to decode as final quanta l = 3 mod 4: 1 padding char is added. In this case a string is of the form  body +  padchar΄. If adding the pad char "completes"" the string so that it is `l = 0 mod 4`, then this may possibly be forming corrupting data. This case is degenerate and should be disallowed.έHence, permissive decodes should only fill in padding chars when it makes sense to add them. That is, if an input is degenerate, it should never succeed when we add padding chars. We need the following invariant to hold:  B64U.decodeUnpadded  |' B64U.decodePadded ~ B64U.decodePadded kml(c) 2019-2022 Emily Pillmore BSD-style$Emily Pillmore  ExperimentalportableNoneΗ  nbase64ρOnly the lookup table need be a foreignptr, and then, only so that we can automate some touches to keep it aliveobase64Read p index off alphabet addrqbase64Convert Word8's into Word32'srbase64Convert Word8's into Word32'ssbase64Convert Word8's into Word32'stbase64Mask bottom 2 bitsubase64Mask bottom 4 bitsvbase64,Validate some ptr index against some bitmaskwbase64Allocate and fill n bytes with some dataxbase64Pack an y into an encoding table of zs{base64/Rechunk a list of bytestrings in multiples of 4n|oqrs}tuvwx{~(c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore  ExperimentalportableNoneαμ `€base64ΡFinalize an encoded bytestring by filling in the remaining bytes and any paddingbase64ΙFinalize a bytestring by filling out the remaining bits without padding.€(c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore  ExperimentalportableNoneΗμ š‚base64Base64url encoding tableƒbase64Base64 std encoding table„base64&Non-URLsafe b64 decoding table (naive)…base64"URLsafe b64 decoding table (naive)‚ƒ„…(c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore  ExperimentalportableNoneαμΩ†base64ΡEncoding inner loop. Packs 3 bytes from src pointer into the first 6 bytes of 4 Word8'#s (using the encoding table, as 2 Word12'&s ), writing these to the dst pointer.‡base64decode lookup tablebase64 src pointerbase64 dst pointerˆbase64decode lookup tablebase64 src pointerbase64 dst pointerbase64end of src ptrbase64 dst foreign ptr (for consing bs)†‡ˆ(c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore  ExperimentalportableNoneαμ‰base64ΡEncoding inner loop. Packs 3 bytes from src pointer into the first 6 bytes of 4 Word8'#s (using the encoding table, as 2 Word12'&s ), writing these to the dst pointer.Šbase64 src pointerbase64 dst pointerbase64end of src ptr‹base64decode lookup tablebase64 src pointerbase64 dst pointerbase64end of src ptrbase64 dst foreign ptr (for consing bs)‰Š‹(c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore  ExperimentalportableNoneαμ–Œbase64ΠEncoding inner loop. Packs 6 bytes from src pointer into the first 6 bits of 4 Word12'#s (using the encoding table, as 2 Word12'&s ), writing these to the dst pointer.base64decode lookup tablebase64 src pointerbase64 dst pointerbase64end of src ptrbase64 dst foreign ptr (for consing bs)Žbase64decode lookup tablebase64 src pointerbase64 dst pointerbase64end of src ptrbase64 dst foreign ptr (for consing bs)ŒŽ(c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore  ExperimentalportableNone μ"base64šThe main decode function. Takes a padding flag, a decoding table, and the input value, producing either an error string on the left, or a decoded value. Note: If PaddingΒ ~ 'Don'tCare', then we pad out the input to a multiple of 4. If Padding ~ PaddedΞ, then we do not, and fail if the input is not a multiple of 4 in length. If Padding ~ Unpaddedμ, then we validate correctness of length and the absence of padding and then treat as a std padded string.‘’(c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore stable non-portable Trustworthy base64 Encode a “ value as Base64 ” with padding.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:encodeBase64 "Sun""U3Vu"base64 Encode a “ value as a Base64 “ value with padding.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:encodeBase64' "Sun""U3Vu"base64Decode a padded Base64-encoded “ value.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64 "U3Vu" Right "Sun"decodeBase64 "U3V"1Left "Base64-encoded bytestring requires padding"decodebase64 "U3V="3Left "non-canonical encoding detected at offset: 2"base64,Leniently decode an unpadded Base64-encoded “ value. This function will not generate parse errors. If input data contains padding chars, then the input will be parsed up until the first pad character.Note: This is not RFC 4648-compliant.Examples:decodeBase64Lenient "U3Vu""Sun"decodeBase64Lenient "U3V""Su"decodebase64Lenient "U3V=""Su"base64Tell whether a “ value is base64 encoded.?This function will also detect non-canonical encodings such as ZE==ν, which are externally valid Base64url-encoded values, but are internally inconsistent "impossible" values.Examples:isBase64 "U3Vu"TrueisBase64 "U3V"FalseisBase64 "U3V="Falsebase64Tell whether a “ value is a valid Base64 format.­This will not tell you whether or not this is a correct Base64url representation, only that it conforms to the correct shape. To check whether it is a true Base64 encoded “ value, use .Examples:isValidBase64 "U3Vu"TrueisValidBase64 "U3V"TrueisValidBase64 "U3V="TrueisValidBase64 "%"False(c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore stable non-portable Trustworthy . base64 Encode a “ value as a Base64url ” value with padding.See: -https://tools.ietf.org/html/rfc4648#section-5RFC-4648 section 5Examples:encodeBase64 "<>" "PDw_Pj4="base64 Encode a “ as a Base64url “ value with padding.See: -https://tools.ietf.org/html/rfc4648#section-5RFC-4648 section 5Examples:encodeBase64' "<>" "PDw_Pj4="base64"Decode a padded Base64url encoded “Ύ value. If its length is not a multiple of 4, then padding chars will be added to fill out the input to a multiple of 4 for safe decoding as Base64url-encoded values are optionally padded.ΒFor a decoder that fails on unpadded input of incorrect size, use  .See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64 "PDw_Pj4=" Right "<>"decodeBase64 "PDw_Pj4" Right "<>"decodeBase64 "PDw-Pg="4Left "Base64-encoded bytestring has invalid padding"decodeBase64 "PDw-Pg" Right "<<>>" base64 Encode a “ value as Base64url ”² without padding. Note that for Base64url, padding is optional. If you call this function, you will simply be encoding as Base64url and stripping padding chars from the output.See: /https://tools.ietf.org/html/rfc4648#section-3.2RFC-4648 section 3.2Examples:encodeBase64Unpadded "<>" "PDw_Pj4" base64 Encode a “Ε value as Base64url without padding. Note that for Base64url, padding is optional. If you call this function, you will simply be encoding as Base64url and stripping padding chars from the output.See: /https://tools.ietf.org/html/rfc4648#section-3.2RFC-4648 section 3.2Examples:encodeBase64Unpadded' "<>" "PDw_Pj4" base64%Decode an unpadded Base64url-encoded “ξ value. Input strings are required to be unpadded, and will undergo validation prior to decoding to confirm.ΣIn general, unless unpadded Base64url is explicitly required, it is safer to call .See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64Unpadded "PDw_Pj4" Right "<>"decodeBase64Unpadded "PDw_Pj4="4Left "Base64-encoded bytestring has invalid padding" base64"Decode a padded Base64url-encoded “π value. Input strings are required to be correctly padded, and will be validated prior to decoding to confirm.ΡIn general, unless padded Base64url is explicitly required, it is safer to call .See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64Padded "PDw_Pj4=" Right "<>"decodeBase64Padded "PDw_Pj4"1Left "Base64-encoded bytestring requires padding" base64/Leniently decode an unpadded Base64url-encoded “—. This function will not generate parse errors. If input data contains padding chars, then the input will be parsed up until the first pad character.Note: This is not RFC 4648-compliant.Examples:decodeBase64Lenient "PDw_Pj4=""<>""decodeBase64Lenient "PDw_%%%$}Pj4""<>"base64Tell whether a “ is encoded in padded or unpadded Base64url format.?This function will also detect non-canonical encodings such as ZE==ν, which are externally valid Base64url-encoded values, but are internally inconsistent "impossible" values.Examples:isBase64Url "PDw_Pj4="TrueisBase64Url "PDw_Pj4"TrueisBase64Url "PDw_Pj"Falsebase64Tell whether a “ is a valid Base64url format.­This will not tell you whether or not this is a correct Base64url representation, only that it conforms to the correct shape. To check whether it is a true Base64 encoded “ value, use .Examples:isValidBase64Url "PDw_Pj4="TrueisValidBase64Url "PDw_Pj"TrueisValidBase64Url "%"False     (c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore stable non-portable Trustworthy 6base64 Encode a • value as Base64 Text with padding.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:encodeBase64 "Sun""U3Vu"base64 Encode a • value as a Base64 • value with padding.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:encodeBase64' "Sun""U3Vu"base64Decode a padded Base64-encoded • value.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64 "U3Vu" Right "Sun"decodeBase64 "U3V"1Left "Base64-encoded bytestring requires padding"decodebase64 "U3V="3Left "non-canonical encoding detected at offset: 2"base64,Leniently decode an unpadded Base64-encoded • value. This function will not generate parse errors. If input data contains padding chars, then the input will be parsed up until the first pad character.Note: This is not RFC 4648-compliant.Examples:decodeBase64Lenient "U3Vu""Sun"decodeBase64Lenient "U3V""Su"decodebase64Lenient "U3V=""Su"base64Tell whether a • value is base64 encoded.?This function will also detect non-canonical encodings such as ZE==ν, which are externally valid Base64url-encoded values, but are internally inconsistent "impossible" values.Examples:isBase64 "U3Vu"TrueisBase64 "U3V"FalseisBase64 "U3V="Falsebase64Tell whether a • value is a valid Base64 format.­This will not tell you whether or not this is a correct Base64url representation, only that it conforms to the correct shape. To check whether it is a true Base64 encoded • value, use .Examples:isValidBase64 "U3Vu"TrueisValidBase64 "U3V"TrueisValidBase64 "U3V="TrueisValidBase64 "%"False(c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore stable non-portable Trustworthy E base64 Encode a • value as a Base64url Text value with padding.See: -https://tools.ietf.org/html/rfc4648#section-5RFC-4648 section 5Examples:encodeBase64 "<>" "PDw_Pj4="base64 Encode a • as a Base64url • value with padding.See: -https://tools.ietf.org/html/rfc4648#section-5RFC-4648 section 5Examples:encodeBase64' "<>" "PDw_Pj4="base64"Decode a padded Base64url encoded •Ύ value. If its length is not a multiple of 4, then padding chars will be added to fill out the input to a multiple of 4 for safe decoding as Base64url-encoded values are optionally padded.ΒFor a decoder that fails on unpadded input of incorrect size, use .See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64 "PDw_Pj4=" Right "<>"decodeBase64 "PDw_Pj4" Right "<>"decodeBase64 "PDw-Pg="4Left "Base64-encoded bytestring has invalid padding"decodeBase64 "PDw-Pg" Right "<<>>"base64 Encode a • value as Base64url Text² without padding. Note that for Base64url, padding is optional. If you call this function, you will simply be encoding as Base64url and stripping padding chars from the output.See: /https://tools.ietf.org/html/rfc4648#section-3.2RFC-4648 section 3.2Examples:encodeBase64Unpadded "<>" "PDw_Pj4"base64 Encode a •Ε value as Base64url without padding. Note that for Base64url, padding is optional. If you call this function, you will simply be encoding as Base64url and stripping padding chars from the output.See: /https://tools.ietf.org/html/rfc4648#section-3.2RFC-4648 section 3.2Examples:encodeBase64Unpadded' "<>" "PDw_Pj4"base64%Decode an unpadded Base64url-encoded •ξ value. Input strings are required to be unpadded, and will undergo validation prior to decoding to confirm.ΣIn general, unless unpadded Base64url is explicitly required, it is safer to call .See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64Unpadded "PDw_Pj4" Right "<>"decodeBase64Unpadded "PDw_Pj4="4Left "Base64-encoded bytestring has invalid padding"base64"Decode a padded Base64url-encoded •π value. Input strings are required to be correctly padded, and will be validated prior to decoding to confirm.ΡIn general, unless padded Base64url is explicitly required, it is safer to call .See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64Padded "PDw_Pj4=" Right "<>"decodeBase64Padded "PDw_Pj4"1Left "Base64-encoded bytestring requires padding"base64/Leniently decode an unpadded Base64url-encoded •—. This function will not generate parse errors. If input data contains padding chars, then the input will be parsed up until the first pad character.Note: This is not RFC 4648-compliant.Examples:decodeBase64Lenient "PDw_Pj4=""<>""decodeBase64Lenient "PDw_%%%$}Pj4""<>"base64Tell whether a • is Base64url-encoded.Examples:isBase64Url "PDw_Pj4="TrueisBase64Url "PDw_Pj4"TrueisBase64Url "PDw_Pj"Falsebase64Tell whether a • is a valid Base64url format.­This will not tell you whether or not this is a correct Base64url representation, only that it conforms to the correct shape. To check whether it is a true Base64 encoded • value, use .Examples:isValidBase64Url "PDw_Pj4="TrueisValidBase64Url "PDw_Pj"TrueisValidBase64Url "%"False  (c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore stable non-portable TrustworthyLW base64 Encode a – value as Base64 — with padding.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:encodeBase64 "Sun""U3Vu"!base64 Encode a – value as a Base64 – value with padding.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:encodeBase64' "Sun""U3Vu""base64Decode a padded Base64-encoded – value.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64 "U3Vu" Right "Sun"decodeBase64 "U3V"1Left "Base64-encoded bytestring requires padding"decodebase64 "U3V="3Left "non-canonical encoding detected at offset: 2"#base64,Leniently decode an unpadded Base64-encoded – value. This function will not generate parse errors. If input data contains padding chars, then the input will be parsed up until the first pad character.Note: This is not RFC 4648-compliant.Examples:decodeBase64Lenient "U3Vu""Sun"decodeBase64Lenient "U3V""Su"decodebase64Lenient "U3V=""Su"$base64Tell whether a – value is base64 encoded.Examples:isBase64 "U3Vu"TrueisBase64 "U3V"FalseisBase64 "U3V="False%base64Tell whether a – value is a valid Base64 format.­This will not tell you whether or not this is a correct Base64url representation, only that it conforms to the correct shape. To check whether it is a true Base64 encoded – value, use $.Examples:isValidBase64 "U3Vu"TrueisValidBase64 "U3V"TrueisValidBase64 "U3V="TrueisValidBase64 "%"False !"#$% !"#$%(c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore stable non-portable Trustworthy[l &base64 Encode a – value as a Base64url ” value with padding.See: -https://tools.ietf.org/html/rfc4648#section-5RFC-4648 section 5Examples:encodeBase64 "<>" "PDw_Pj4="'base64 Encode a – as a Base64url – value with padding.See: -https://tools.ietf.org/html/rfc4648#section-5RFC-4648 section 5Examples:encodeBase64' "<>" "PDw_Pj4="(base64"Decode a padded Base64url encoded –Ύ value. If its length is not a multiple of 4, then padding chars will be added to fill out the input to a multiple of 4 for safe decoding as Base64url-encoded values are optionally padded.ΒFor a decoder that fails on unpadded input of incorrect size, use +.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64 "PDw_Pj4=" Right "<>"decodeBase64 "PDw_Pj4" Right "<>"decodeBase64 "PDw-Pg="4Left "Base64-encoded bytestring has invalid padding"decodeBase64 "PDw-Pg" Right "<<>>")base64 Encode a – value as Base64url ”² without padding. Note that for Base64url, padding is optional. If you call this function, you will simply be encoding as Base64url and stripping padding chars from the output.See: /https://tools.ietf.org/html/rfc4648#section-3.2RFC-4648 section 3.2Examples:encodeBase64Unpadded "<>" "PDw_Pj4"*base64 Encode a –Ε value as Base64url without padding. Note that for Base64url, padding is optional. If you call this function, you will simply be encoding as Base64url and stripping padding chars from the output.See: /https://tools.ietf.org/html/rfc4648#section-3.2RFC-4648 section 3.2Examples:encodeBase64Unpadded' "<>" "PDw_Pj4"+base64%Decode an unpadded Base64url-encoded –ξ value. Input strings are required to be unpadded, and will undergo validation prior to decoding to confirm.ΣIn general, unless unpadded Base64url is explicitly required, it is safer to call (.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64Unpadded "PDw_Pj4" Right "<>"decodeBase64Unpadded "PDw_Pj4="4Left "Base64-encoded bytestring has invalid padding",base64"Decode a padded Base64url-encoded –π value. Input strings are required to be correctly padded, and will be validated prior to decoding to confirm.ΡIn general, unless padded Base64url is explicitly required, it is safer to call (.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64Padded "PDw_Pj4=" Right "<>"decodeBase64Padded "PDw_Pj4"1Left "Base64-encoded bytestring requires padding"-base64/Leniently decode an unpadded Base64url-encoded –—. This function will not generate parse errors. If input data contains padding chars, then the input will be parsed up until the first pad character.Note: This is not RFC 4648-compliant.Examples:decodeBase64Lenient "PDw_Pj4=""<>""decodeBase64Lenient "PDw_%%%$}Pj4""<>".base64Tell whether a – is Base64url-encoded.Examples:isBase64Url "PDw_Pj4="TrueisBase64Url "PDw_Pj4"TrueisBase64Url "PDw_Pj"False/base64Tell whether a – is a valid Base64url format.­This will not tell you whether or not this is a correct Base64url representation, only that it conforms to the correct shape. To check whether it is a true Base64 encoded – value, use ..Examples:isValidBase64Url "PDw_Pj4="TrueisValidBase64Url "PDw_Pj"TrueisValidBase64Url "%"False &'()*+,-./ &')*(+,-./(c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore stable non-portableSafe8]ν0base64δThis data type represents the type of decoding errors of various kinds as they pertain to decoding ”€ values. Namely, to distinguish between decoding errors from opaque unicode exceptions caught in the unicode decoding process.1base64ΦThe error associated with decoding failure as a result of the Base64 decoding process2base64ΥThe error associated with the decoding failure as a result of the conversion process3base644base647base64012012(c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore stable non-portableSafegc8base64 Encode a ” value in Base64 with padding.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:encodeBase64 "Sun""U3Vu"9base64Decode a padded Base64-encoded ” value.Note:Β This function makes sure that decoding is total by deferring to ˜ΐ. This will always round trip for any valid Base64-encoded text value, but it may not round trip for bad inputs. The onus is on the caller to make sure inputs are valid. If unsure, defer to :' and pass in a custom decode function.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64 "U3Vu" Right "Sun"decodeBase64 "U3V"1Left "Base64-encoded bytestring requires padding"decodebase64 "U3V="3Left "non-canonical encoding detected at offset: 2":base64Attempt to decode a ”# value as Base64, converting from “ to ”Λ according to some encoding function. In practice, This is something like  decodeUtf8', which may produce an error.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Example: : ™ :: “ -> š (0 UnicodeException) ” ;base64"Leniently decode a Base64-encoded ” value. This function will not generate parse errors. If input data contains padding chars, then the input will be parsed up until the first pad character.Note: This is not RFC 4648-compliant.Examples:decodeBase64Lenient "U3Vu""Sun"decodeBase64Lenient "U3V""Su"decodebase64Lenient "U3V=""Su"<base64Tell whether a ” value is Base64-encoded.Examples:isBase64 "U3Vu"TrueisBase64 "U3V"FalseisBase64 "U3V="False=base64Tell whether a ” value is a valid Base64 format.ͺThis will not tell you whether or not this is a correct Base64 representation, only that it conforms to the correct shape. To check whether it is a true Base64 encoded ” value, use <.Examples:isValidBase64 "U3Vu"TrueisValidBase64 "U3V"TrueisValidBase64 "U3V="TrueisValidBase64 "%"False:base64#convert a bytestring to text (e.g. ™)base64Input text to decode89:;<=89:;<= (c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore stable non-portableSafe|+ >base64 Encode a ”! value in Base64url with padding.See: -https://tools.ietf.org/html/rfc4648#section-5RFC-4648 section 5Examples:encodeBase64 "<>" "PDw_Pj4="?base64"Decode a padded Base64url-encoded ”Ή value. If its length is not a multiple of 4, then padding chars will be added to fill out the input to a multiple of 4 for safe decoding as base64url encodings are optionally padded.0For a decoder that fails on unpadded input, use BNote:Β This function makes sure that decoding is total by deferring to ˜ΐ. This will always round trip for any valid Base64-encoded text value, but it may not round trip for bad inputs. The onus is on the caller to make sure inputs are valid. If unsure, defer to @' and pass in a custom decode function.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64 "PDw_Pj4=" Right "<>"decodeBase64 "PDw_Pj4" Right "<>"decodeBase64 "PDw-Pg="4Left "Base64-encoded bytestring has invalid padding"decodeBase64 "PDw-Pg" Right "<<>>"@base64Attempt to decode a “& value as Base64url, converting from “ to ”Λ according to some encoding function. In practice, This is something like  decodeUtf8', which may produce an error.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples: @ ™ :: ” -> š (0 UnicodeException) ” Abase64 Encode a ”Ε value in Base64url without padding. Note that for Base64url, padding is optional. If you call this function, you will simply be encoding as Base64url and stripping padding chars from the output.See: /https://tools.ietf.org/html/rfc4648#section-3.2RFC-4648 section 3.2Examples:encodeBase64Unpadded "<>" "PDw_Pj4"Bbase64%Decode an unpadded Base64url encoded ” value.Note:Β This function makes sure that decoding is total by deferring to ˜Α. This will always round trip for any valid Base64-encoded text value, but it may not round trip for bad inputs. The onus is on the caller to make sure inputs are valid. If unsure, defer to C& and pass in a custom decode function.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64Unpadded "PDw_Pj4" Right "<>"decodeBase64Unpadded "PDw_Pj4="4Left "Base64-encoded bytestring has invalid padding"Cbase64Attempt to decode an unpadded “& value as Base64url, converting from “ to ”Λ according to some encoding function. In practice, This is something like  decodeUtf8', which may produce an error.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Example: C ™ :: “ -> š (0 UnicodeException) ” Dbase64#Decode an padded Base64url encoded ” valueNote:Β This function makes sure that decoding is total by deferring to ˜ΐ. This will always round trip for any valid Base64-encoded text value, but it may not round trip for bad inputs. The onus is on the caller to make sure inputs are valid. If unsure, defer to E' and pass in a custom decode function.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64Padded "PDw_Pj4=" Right "<>"decodeBase64Padded "PDw_Pj4"1Left "Base64-encoded bytestring requires padding"Ebase64Attempt to decode a padded “& value as Base64url, converting from “ to ”Λ according to some encoding function. In practice, This is something like  decodeUtf8', which may produce an error.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Example: E ™ :: “ -> š (0 UnicodeException) ” Fbase64/Leniently decode an unpadded Base64url-encoded ”—. This function will not generate parse errors. If input data contains padding chars, then the input will be parsed up until the first pad character.Note: This is not RFC 4648-compliant.Examples:decodeBase64Lenient "PDw_Pj4=""<>""decodeBase64Lenient "PDw_%%%$}Pj4""<>"Gbase64Tell whether a ” value is Base64url-encoded.Examples:isBase64Url "PDw_Pj4="TrueisBase64Url "PDw_Pj4"TrueisBase64Url "PDw_Pj"FalseHbase64Tell whether a ”# value is a valid Base64url format.­This will not tell you whether or not this is a correct Base64url representation, only that it conforms to the correct shape. To check whether it is a true Base64 encoded ” value, use G.Examples:isValidBase64Url "PDw_Pj4="TrueisValidBase64Url "PDw_Pj"TrueisValidBase64Url "%"False@base64#convert a bytestring to text (e.g. ™)base64Input text to decodeCbase64#convert a bytestring to text (e.g. ™)base64Input text to decodeEbase64#convert a bytestring to text (e.g. ™)base64Input text to decode >?@ABCDEFGH >A?@BCDEFGH (c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore stable non-portableSafe…±Ibase64 Encode a › value in Base64 with padding.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:encodeBase64 "Sun""U3Vu"Jbase64Decode a padded Base64-encoded › valueSee: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Note:Β This function makes sure that decoding is total by deferring to ΐ. This will always round trip for any valid Base64-encoded text value, but it may not round trip for bad inputs. The onus is on the caller to make sure inputs are valid. If unsure, defer to K' and pass in a custom decode function.Examples:decodeBase64 "U3Vu" Right "Sun"decodeBase64 "U3V"1Left "Base64-encoded bytestring requires padding"decodebase64 "U3V="3Left "non-canonical encoding detected at offset: 2"Kbase64Attempt to decode a •# value as Base64, converting from • to ›Λ according to some encoding function. In practice, This is something like  decodeUtf8', which may produce an error.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Example: K œ :: • -> š (0 UnicodeException) › Lbase64"Leniently decode a Base64-encoded › value. This function will not generate parse errors. If input data contains padding chars, then the input will be parsed up until the first pad character.Note: This is not RFC 4648-compliant.Examples:decodeBase64Lenient "U3Vu""Sun"decodeBase64Lenient "U3V""Su"decodebase64Lenient "U3V=""Su"Mbase64Tell whether a › value is Base64-encoded.Examples:isBase64 "U3Vu"TrueisBase64 "U3V"FalseisBase64 "U3V="FalseNbase64Tell whether a › value is a valid Base64 format.ͺThis will not tell you whether or not this is a correct Base64 representation, only that it conforms to the correct shape. To check whether it is a true Base64 encoded › value, use M.Examples:isValidBase64 "U3Vu"TrueisValidBase64 "U3V"TrueisValidBase64 "U3V="TrueisValidBase64 "%"FalseKbase64#convert a bytestring to text (e.g. œ)base64Input text to decodeIJKLMNIJKLMN (c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore stable non-portableSafeš¬ Obase64 Encode a ›! value in Base64url with padding.See: -https://tools.ietf.org/html/rfc4648#section-5RFC-4648 section 5Examples:encodeBase64 "<>" "PDw_Pj4="Pbase64"Decode a padded Base64url-encoded ›Ή value. If its length is not a multiple of 4, then padding chars will be added to fill out the input to a multiple of 4 for safe decoding as base64url encodings are optionally padded.0For a decoder that fails on unpadded input, use S.Note:Β This function makes sure that decoding is total by deferring to ΐ. This will always round trip for any valid Base64-encoded text value, but it may not round trip for bad inputs. The onus is on the caller to make sure inputs are valid. If unsure, defer to Q' and pass in a custom decode function.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64 "PDw_Pj4=" Right "<>"decodeBase64 "PDw_Pj4" Right "<>"decodeBase64 "PDw-Pg="4Left "Base64-encoded bytestring has invalid padding"decodeBase64 "PDw-Pg" Right "<<>>"Qbase64Attempt to decode a lazy •& value as Base64url, converting from • to ›Λ according to some encoding function. In practice, This is something like  decodeUtf8', which may produce an error.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples: Q œ :: • -> š (0 UnicodeException) › Rbase64 Encode a ›Ε value in Base64url without padding. Note that for Base64url, padding is optional. If you call this function, you will simply be encoding as Base64url and stripping padding chars from the output.See: /https://tools.ietf.org/html/rfc4648#section-3.2RFC-4648 section 3.2Examples:encodeBase64Unpadded "<>" "PDw_Pj4"Sbase64%Decode an unpadded Base64url encoded › value.Note:Β This function makes sure that decoding is total by deferring to ΐ. This will always round trip for any valid Base64-encoded text value, but it may not round trip for bad inputs. The onus is on the caller to make sure inputs are valid. If unsure, defer to decodeBase64WUnpaddedWith' and pass in a custom decode function.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64Unpadded "PDw_Pj4" Right "<>"decodeBase64Unpadded "PDw_Pj4="4Left "Base64-encoded bytestring has invalid padding"Tbase64#Attempt to decode an unpadded lazy •& value as Base64url, converting from • to ›Λ according to some encoding function. In practice, This is something like  decodeUtf8', which may produce an error.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples: T œ :: • -> š (0 UnicodeException) › Ubase64#Decode an padded Base64url encoded › valueNote:Β This function makes sure that decoding is total by deferring to ΐ. This will always round trip for any valid Base64-encoded text value, but it may not round trip for bad inputs. The onus is on the caller to make sure inputs are valid. If unsure, defer to V' and pass in a custom decode function.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64Padded "PDw_Pj4=" Right "<>"decodeBase64Padded "PDw_Pj4"1Left "Base64-encoded bytestring requires padding"Vbase64 Attempt to decode a padded lazy •& value as Base64url, converting from • to ›Λ according to some encoding function. In practice, This is something like  decodeUtf8', which may produce an error.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Example: V  :: • -> š (0 UnicodeException) Text Wbase64/Leniently decode an unpadded Base64url-encoded ›—. This function will not generate parse errors. If input data contains padding chars, then the input will be parsed up until the first pad character.Note: This is not RFC 4648-compliant.Examples:decodeBase64Lenient "PDw_Pj4=""<>""decodeBase64Lenient "PDw_%%%$}Pj4""<>"Xbase64Tell whether a › value is Base64url-encodedExamples:isBase64Url "PDw_Pj4="TrueisBase64Url "PDw_Pj4"TrueisBase64Url "PDw_Pj"FalseYbase64Tell whether a ›# value is a valid Base64url format.­This will not tell you whether or not this is a correct Base64url representation, only that it conforms to the correct shape. To check whether it is a true Base64 encoded › value, use X.Examples:isValidBase64Url "PDw_Pj4="TrueisValidBase64Url "PDw_Pj"TrueisValidBase64Url "%"FalseQbase64#convert a bytestring to text (e.g. œ)base64Input text to decodeTbase64#convert a bytestring to text (e.g. œ)base64Input text to decodeVbase64#convert a bytestring to text (e.g. œ)base64Input text to decode OPQRSTUVWXY ORPQSTUVWXY (c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore stable non-portable Trustworthy€DZbase64 Encode a — value in Base64 with padding.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:encodeBase64 "Sun""U3Vu"[base64Decode a padded Base64-encoded — valueNote:Β This function makes sure that decoding is total by deferring to ΐ. This will always round trip for any valid Base64-encoded text value, but it may not round trip for bad inputs. The onus is on the caller to make sure inputs are valid. If unsure, defer to \' and pass in a custom decode function.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64 "U3Vu" Right "Sun"decodeBase64 "U3V"1Left "Base64-encoded bytestring requires padding"decodebase64 "U3V="3Left "non-canonical encoding detected at offset: 2"\base64Attempt to decode a –# value as Base64, converting from  ByteString to —Λ according to some encoding function. In practice, This is something like  decodeUtf8', which may produce an error.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Example: \  :: – -> š (0 UnicodeException) — ]base64"Leniently decode a Base64-encoded — value. This function will not generate parse errors. If input data contains padding chars, then the input will be parsed up until the first pad character.Note: This is not RFC 4648-compliant.Examples:decodeBase64Lenient "U3Vu""Sun"decodeBase64Lenient "U3V""Su"decodebase64Lenient "U3V=""Su"^base64Tell whether a — value is Base64-encoded.Examples:isBase64 "U3Vu"TrueisBase64 "U3V"FalseisBase64 "U3V="False_base64Tell whether a — value is a valid Base64 format.ͺThis will not tell you whether or not this is a correct Base64 representation, only that it conforms to the correct shape. To check whether it is a true Base64 encoded — value, use ^.Examples:isValidBase64 "U3Vu"TrueisValidBase64 "U3V"TrueisValidBase64 "U3V="TrueisValidBase64 "%"False\base64#convert a bytestring to text (e.g. )base64Input text to decodeZ[\]^_Z[\]^_ (c) 2019-2020 Emily Pillmore BSD-style$Emily Pillmore stable non-portable TrustworthyΉ4 `base64 Encode a —! value in Base64url with padding.See: -https://tools.ietf.org/html/rfc4648#section-5RFC-4648 section 5Examples:encodeBase64 "<>" "PDw_Pj4="abase64"Decode a padded Base64url-encoded —Ή value. If its length is not a multiple of 4, then padding chars will be added to fill out the input to a multiple of 4 for safe decoding as base64url encodings are optionally padded.0For a decoder that fails on unpadded input, use d.Note:Β This function makes sure that decoding is total by deferring to ΐ. This will always round trip for any valid Base64-encoded text value, but it may not round trip for bad inputs. The onus is on the caller to make sure inputs are valid. If unsure, defer to b' and pass in a custom decode function.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64 "PDw_Pj4=" Right "<>"decodeBase64 "PDw_Pj4" Right "<>"decodeBase64 "PDw-Pg="4Left "Base64-encoded bytestring has invalid padding"decodeBase64 "PDw-Pg" Right "<<>>"bbase64Attempt to decode a –& value as Base64url, converting from  ByteString to —Λ according to some encoding function. In practice, This is something like  decodeUtf8', which may produce an error.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples: b  :: – -> š (0 UnicodeException) — cbase64 Encode a —Ε value in Base64url without padding. Note that for Base64url, padding is optional. If you call this function, you will simply be encoding as Base64url and stripping padding chars from the output.See: /https://tools.ietf.org/html/rfc4648#section-3.2RFC-4648 section 3.2Examples:encodeBase64Unpadded "<>" "PDw_Pj4"dbase64%Decode an unpadded Base64url encoded — value.Note:Β This function makes sure that decoding is total by deferring to ΐ. This will always round trip for any valid Base64-encoded text value, but it may not round trip for bad inputs. The onus is on the caller to make sure inputs are valid. If unsure, defer to e' and pass in a custom decode function.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64Unpadded "PDw_Pj4" Right "<>"decodeBase64Unpadded "PDw_Pj4="4Left "Base64-encoded bytestring has invalid padding"ebase64Attempt to decode an unpadded –& value as Base64url, converting from – to —Λ according to some encoding function. In practice, This is something like  decodeUtf8', which may produce an error.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples: e  :: – -> š (0 UnicodeException) — fbase64#Decode an padded Base64url encoded — valueNote:Β This function makes sure that decoding is total by deferring to ΐ. This will always round trip for any valid Base64-encoded text value, but it may not round trip for bad inputs. The onus is on the caller to make sure inputs are valid. If unsure, defer to g' and pass in a custom decode function.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples:decodeBase64Padded "PDw_Pj4=" Right "<>"decodeBase64Padded "PDw_Pj4"1Left "Base64-encoded bytestring requires padding"gbase64Attempt to decode a padded –& value as Base64url, converting from  ByteString to —Λ according to some encoding function. In practice, This is something like  decodeUtf8', which may produce an error.See: -https://tools.ietf.org/html/rfc4648#section-4RFC-4648 section 4Examples: b  :: – -> š (0 UnicodeException) — hbase64/Leniently decode an unpadded Base64url-encoded ——. This function will not generate parse errors. If input data contains padding chars, then the input will be parsed up until the first pad character.Note: This is not RFC 4648-compliant.Examples:decodeBase64Lenient "PDw_Pj4=""<>""decodeBase64Lenient "PDw_%%%$}Pj4""<>"ibase64Tell whether a — value is Base64url-encoded.Examples:isBase64Url "PDw_Pj4="TrueisBase64Url "PDw_Pj4"TrueisBase64Url "PDw_Pj"Falsejbase64Tell whether a —# value is a valid Base64url format.­This will not tell you whether or not this is a correct Base64url representation, only that it conforms to the correct shape. To check whether it is a true Base64 encoded — value, use i.Examples:isValidBase64Url "PDw_Pj4="TrueisValidBase64Url "PDw_Pj"TrueisValidBase64Url "%"Falsebbase64#convert a bytestring to text (e.g. )base64Input text to decodeebase64#convert a bytestring to text (e.g. )base64Input text to decodegbase64#convert a bytestring to text (e.g. )base64Input text to decode `abcdefghij `cabdefghij !"#$ !"#$ !"#$%&'()*+,-   -  ! . " /  # $   -      -  ! . " /  # $   -      -  ! . " /  # $0123456789:;<=>?@AB56CD3EFGHIJKLMNOPNOPNOPQRSTUVWXYZU[WU\]^_`XaXa5bcXdZXeζ%base64-0.4.2.4-2drfXznN3hbK8FFJttJxGJData.ByteString.Base64Data.ByteString.Base64.URLData.ByteString.Lazy.Base64Data.ByteString.Lazy.Base64.URLData.ByteString.Short.Base64 Data.ByteString.Short.Base64.URLData.Text.Encoding.Base64.ErrorData.Text.Encoding.Base64Data.Text.Encoding.Base64.URLData.Text.Lazy.Encoding.Base64"Data.Text.Lazy.Encoding.Base64.URLData.Text.Short.Encoding.Base64#Data.Text.Short.Encoding.Base64.URLData.ByteString.Base64.Internal%Data.ByteString.Base64.Internal.Utils$Data.ByteString.Base64.Internal.Tail&Data.ByteString.Base64.Internal.Tables(Data.ByteString.Base64.Internal.W16.Loop(Data.ByteString.Base64.Internal.W32.Loop(Data.ByteString.Base64.Internal.W64.Loop$Data.ByteString.Base64.Internal.HeadT decodeLatin1 decodeUtf8' encodeBase64 encodeBase64' decodeBase64decodeBase64LenientisBase64 isValidBase64encodeBase64UnpaddedencodeBase64Unpadded'decodeBase64UnpaddeddecodeBase64Padded isBase64UrlisValidBase64Url Base64Error DecodeErrorConversionError$fNFDataBase64Error$fExceptionBase64Error$fEqBase64Error$fShowBase64Error$fGenericBase64ErrordecodeBase64WithdecodeBase64UnpaddedWithdecodeBase64PaddedWithvalidateBase64validateLastPadvalidateBase64Url EncodingTableaixbaseGHC.WordWord8w32w64w64_16 mask_2bits mask_4bitsvalidateLastPoswriteNPlainForeignPtrBytes packTableghc-primGHC.PrimAddr#Word16reChunkNw32_16 peekWord32BE peekWord64BEloopTail loopTailNoPadbase64UrlTable base64TabledecodeB64TabledecodeB64UrlTable innerLoop decodeLoop lenientLoop decodeBase64_ encodeBase64_encodeBase64Nopad_decodeBase64Lenient_bytestring-0.10.10.0Data.ByteString.Internal ByteString text-1.2.3.2Data.Text.InternalTextData.ByteString.Lazy.InternalData.ByteString.Short.InternalShortByteString&text-short-0.1.5-Aj5kj0q5c5XWnjQA55Ke8Data.Text.Short.Internal ShortTextData.Text.Encoding Data.EitherEitherData.Text.Internal.LazyData.Text.Lazy.Encoding