-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Fast base64 encoding and decoding for ByteStrings
--   
--   This package provides support for encoding and decoding binary data
--   according to <tt>base64</tt> (see also <a>RFC 4648</a>) for strict and
--   lazy ByteStrings
--   
--   For a fuller-featured and better-performing Base64 library, see the
--   <a>base64</a> package.
@package base64-bytestring
@version 1.2.1.0


-- | Fast and efficient encoding and decoding of base64-encoded strings.
module Data.ByteString.Base64

-- | Encode a string into base64 form. The result will always be a multiple
--   of 4 bytes in length.
encode :: ByteString -> ByteString

-- | Decode a base64-encoded string. This function strictly follows the
--   specification in <a>RFC 4648</a>.
--   
--   (Note: this means that even <tt>"\n"</tt> and <tt>"\r\n"</tt> as line
--   breaks are rejected rather than ignored. If you are using this in the
--   context of a standard that overrules RFC 4648 such as HTTP multipart
--   mime bodies, consider using <a>decodeLenient</a>.)
decode :: ByteString -> Either String ByteString

-- | Decode a base64-encoded string. This function is lenient in following
--   the specification from <a>RFC 4648</a>, and will not generate parse
--   errors no matter how poor its input.
decodeLenient :: ByteString -> ByteString


-- | Fast and efficient encoding and decoding of base64-encoded lazy
--   bytestrings.
module Data.ByteString.Base64.Lazy

-- | Encode a string into base64 form. The result will always be a multiple
--   of 4 bytes in length.
encode :: ByteString -> ByteString

-- | Decode a base64-encoded string. This function strictly follows the
--   specification in <a>RFC 4648</a>.
decode :: ByteString -> Either String ByteString

-- | Decode a base64-encoded string. This function is lenient in following
--   the specification from <a>RFC 4648</a>, and will not generate parse
--   errors no matter how poor its input.
decodeLenient :: ByteString -> ByteString


-- | Fast and efficient encoding and decoding of base64url-encoded strings.
module Data.ByteString.Base64.URL

-- | Encode a string into base64url form. The result will always be a
--   multiple of 4 bytes in length.
encode :: ByteString -> ByteString

-- | Encode a string into unpadded base64url form.
encodeUnpadded :: ByteString -> ByteString

-- | Decode a base64url-encoded string applying padding if necessary. This
--   function follows the specification in <a>RFC 4648</a> and in <a>RFC
--   7049 2.4</a>
decode :: ByteString -> Either String ByteString

-- | Decode a padded base64url-encoded string, failing if input is
--   improperly padded. This function follows the specification in <a>RFC
--   4648</a> and in <a>RFC 7049 2.4</a>
decodePadded :: ByteString -> Either String ByteString

-- | Decode a unpadded base64url-encoded string, failing if input is
--   padded. This function follows the specification in <a>RFC 4648</a> and
--   in <a>RFC 7049 2.4</a>
decodeUnpadded :: ByteString -> Either String ByteString

-- | Decode a base64url-encoded string. This function is lenient in
--   following the specification from <a>RFC 4648</a>, and will not
--   generate parse errors no matter how poor its input.
decodeLenient :: ByteString -> ByteString


-- | Fast and efficient encoding and decoding of base64-encoded lazy
--   bytestrings.
module Data.ByteString.Base64.URL.Lazy

-- | Encode a string into base64 form. The result will always be a multiple
--   of 4 bytes in length.
encode :: ByteString -> ByteString

-- | Encode a string into unpadded base64url form.
encodeUnpadded :: ByteString -> ByteString

-- | Decode a base64-encoded string. This function strictly follows the
--   specification in <a>RFC 4648</a>.
decode :: ByteString -> Either String ByteString

-- | Decode a unpadded base64url-encoded string, failing if input is
--   padded. This function follows the specification in <a>RFC 4648</a> and
--   in <a>RFC 7049 2.4</a>
decodeUnpadded :: ByteString -> Either String ByteString

-- | Decode a padded base64url-encoded string, failing if input is
--   improperly padded. This function follows the specification in <a>RFC
--   4648</a> and in <a>RFC 7049 2.4</a>
decodePadded :: ByteString -> Either String ByteString

-- | Decode a base64-encoded string. This function is lenient in following
--   the specification from <a>RFC 4648</a>, and will not generate parse
--   errors no matter how poor its input.
decodeLenient :: ByteString -> ByteString
