-- 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 base64 (see also RFC 4648) for strict and
--   lazy ByteStrings
--   
--   For a fuller-featured and better-performing Base64 library, see the
--   base64 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 RFC 4648.
--   
--   (Note: this means that even "\n" and "\r\n" 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 decodeLenient.)
decode :: ByteString -> Either String ByteString

-- | 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.
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 RFC 4648.
decode :: ByteString -> Either String ByteString

-- | 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.
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 RFC 4648 and in RFC
--   7049 2.4
decode :: ByteString -> Either String ByteString

-- | 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
decodePadded :: ByteString -> Either String ByteString

-- | 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
decodeUnpadded :: ByteString -> Either String ByteString

-- | Decode a base64url-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.
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 RFC 4648.
decode :: ByteString -> Either String ByteString

-- | 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
decodeUnpadded :: ByteString -> Either String ByteString

-- | 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
decodePadded :: ByteString -> Either String ByteString

-- | 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.
decodeLenient :: ByteString -> ByteString
