Copyright | (c) 2012 Ian Lynagh |
---|---|
License | BSD-style |
Maintainer | bos@serpentine.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Fast and efficient encoding and decoding of base64-encoded lazy bytestrings.
Since: 1.0.0.0
Synopsis
Documentation
encode :: ByteString -> ByteString Source #
Encode a string into base64 form. The result will always be a multiple of 4 bytes in length.
encodeUnpadded :: ByteString -> ByteString Source #
Encode a string into unpadded base64url form.
Since: 1.1.0.0
decode :: ByteString -> Either String ByteString Source #
Decode a base64-encoded string. This function strictly follows the specification in RFC 4648.
decodeUnpadded :: ByteString -> Either String ByteString Source #
Decode a unpadded base64url-encoded string, failing if input is padded. This function follows the specification in RFC 4648 and in RFC 7049 2.4
Since: 1.1.0.0
decodePadded :: ByteString -> Either String ByteString Source #
Decode a padded base64url-encoded string, failing if input is improperly padded. This function follows the specification in RFC 4648 and in RFC 7049 2.4
Since: 1.1.0.0
decodeLenient :: ByteString -> ByteString Source #
Decode a base64-encoded string. This function is lenient in following the specification from RFC 4648, and will not generate parse errors no matter how poor its input.