memory-0.14.8: memory and related abstraction stuff

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Data.ByteArray.Encoding

Description

ByteArray base converting

Synopsis

Documentation

convertToBase :: (ByteArrayAccess bin, ByteArray bout) => Base -> bin -> bout #

Convert a bytearray to the equivalent representation in a specific Base

convertFromBase :: (ByteArrayAccess bin, ByteArray bout) => Base -> bin -> Either String bout #

Try to Convert a bytearray from the equivalent representation in a specific Base

data Base #

Different bases that can be used

See RFC4648 for details. In particular, Base64 can be standard or URL-safe. URL-safe encoding is often used in other specifications without padding characters.

Constructors

Base16

similar to hexadecimal

Base32 
Base64

standard Base64

Base64URLUnpadded

unpadded URL-safe Base64

Base64OpenBSD

Base64 as used in OpenBSD password encoding (such as bcrypt)

Instances

Eq Base # 

Methods

(==) :: Base -> Base -> Bool #

(/=) :: Base -> Base -> Bool #

Show Base # 

Methods

showsPrec :: Int -> Base -> ShowS #

show :: Base -> String #

showList :: [Base] -> ShowS #