memory-0.7: memory and related abtraction stuff

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

Data.Memory.Encoding.Base64

Description

Base64

Synopsis

Documentation

toBase64 :: Ptr Word8 -> Ptr Word8 -> Int -> IO () Source

Transform a number of bytes pointed by.src in the base64 binary representation in dst

destination memory need to be of correct size, otherwise it will lead to really bad things.

unBase64Length :: Ptr Word8 -> Int -> IO (Maybe Int) Source

Get the length needed for the destination buffer for a base64 decoding.

if the length is not a multiple of 4, Nothing is returned

fromBase64 :: Ptr Word8 -> Ptr Word8 -> Int -> IO (Maybe Int) Source

convert from base64 in src to binary in dst, using the number of bytes specified

the user should use unBase64Length to compute the correct length, or check that the length specification is proper. no check is done here.