memory-0.14.14: 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 Source #

Convert a bytearray to the equivalent representation in a specific Base

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

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

data Base Source #

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 Source # 

Methods

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

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

Show Base Source # 

Methods

showsPrec :: Int -> Base -> ShowS #

show :: Base -> String #

showList :: [Base] -> ShowS #