ContentsIndex
Codec.Encryption.Utils
Portability portable
Stability experimental
Maintainer dominic.steinitz@blueyonder.co.uk
Contents
Types
Function types
Description
Utilities to translate between Integral and lists of Octet.
Synopsis
type Octet = Word8
toOctets :: Integral a => a -> [Octet]
fromOctets :: Num a => [Octet] -> a
i2osp :: Integral a => Int -> a -> [Octet]
Types
type Octet = Word8
Function types
toOctets :: Integral a => a -> [Octet]
Take a number a convert it to base 256 as a list of octets.
fromOctets :: Num a => [Octet] -> a
Take a list of octets (a number expressed in base 256) and convert it to a number.
i2osp :: Integral a => Int -> a -> [Octet]
Take the length of the required number of octets and convert the number to base 256 padding it out to the required length. If the required length is less than the number of octets of the converted number then return the converted number. NB this is different from the standard ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1.pdf but mimics how replicate behaves.
Produced by Haddock version 0.6