Crypto-4.1.0: DES, Blowfish, AES, TEA, SHA1, MD5, RSA, BubbleBabble, Hexdump, Support for Word128, Word192 and Word256 and Beyond, PKCS5 Padding, Various Encryption Modes e.g. Cipher Block Chaining all in one package.





Utilities for coding and decoding.


Types and Constants

type Octet = Word8Source

The basic type for encoding and decoding.

msb :: IntSource

The most significant bit of an Octet.

Octet Conversion Functions

fromTwosComp :: Integral a => [Octet] -> aSource

Convert from twos complement.

toOctets :: (Integral a, Integral b) => a -> b -> [Octet]Source

Take a number a convert it to base n as a list of octets.

fromOctets :: (Integral a, Integral b) => a -> [Octet] -> bSource

Take a list of octets (a number expressed in base n) and convert it to a number.

i2osp :: Integral a => Int -> a -> [Octet]Source

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 but mimics how replicate behaves.