Z-Data-0.6.1.0: Array, vector and text
Copyright(c) Dong Han 2017-2018
LicenseBSD
Maintainerwinterland1989@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Z.Data.Vector.Base64

Description

This module provides base64 encoding & decoding tools, as well as Base64Bytes newtype with base64 textual instances.

Synopsis

Encoding & Decoding functions

base64Encode :: Bytes -> Bytes Source #

Encode Bytes using base64 encoding.

base64EncodeLength :: Int -> Int Source #

Return the encoded length of a given input length, always a multipler of 4.

base64Decode :: Bytes -> Maybe Bytes Source #

Decode a base64 encoding string, return Nothing on illegal bytes or incomplete input.

base64Decode' :: HasCallStack => Bytes -> Bytes Source #

Decode a base64 encoding string, throw Base64DecodeException on error.

base64DecodeLength :: Int -> Int Source #

Return the upper bound of decoded length of a given input length , return -1 if illegal(not a multipler of 4).

Internal C FFIs