Z-Data-0.5.0.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

The Base64Bytes type

newtype Base64Bytes Source #

New type wrapper for Bytes with base64 encoding Show/JSON instances.

Constructors

Base64Bytes 

Fields

Instances

Instances details
Eq Base64Bytes Source # 
Instance details

Defined in Z.Data.Vector.Base64

Ord Base64Bytes Source # 
Instance details

Defined in Z.Data.Vector.Base64

Show Base64Bytes Source # 
Instance details

Defined in Z.Data.Vector.Base64

Semigroup Base64Bytes Source # 
Instance details

Defined in Z.Data.Vector.Base64

Monoid Base64Bytes Source # 
Instance details

Defined in Z.Data.Vector.Base64

Hashable Base64Bytes Source # 
Instance details

Defined in Z.Data.Vector.Base64

Print Base64Bytes Source # 
Instance details

Defined in Z.Data.Vector.Base64

JSON Base64Bytes Source # 
Instance details

Defined in Z.Data.Vector.Base64

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