MissingH-1.4.1.0: Large utility library

Copyright | Copyright (C) 2001 Ian Lynagh
License | Either BSD or GPL
Maintainer | Ian Lynagh <igloo@earth.li>
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Data.Hash.MD5

Description

Generation of MD5sums

Written by Ian Lynagh, igloo@earth.li

Synopsis

- md5 :: MD5 a => a -> ABCD
- md5s :: MD5 a => a -> String
- md5i :: MD5 a => a -> Integer
- class MD5 a where
  - get_next :: a -> ([Word32], Int, a)
  - len_pad :: Zord64 -> a -> a
  - finished :: a -> Bool
- newtype ABCD = ABCD (Word32, Word32, Word32, Word32)
- type Zord64 = Word64
- newtype Str = Str String
- newtype BoolList = BoolList [Bool]
- newtype WordList = WordList ([Word32], Zord64)

# Documentation

md5 :: MD5 a => a -> ABCD #

The simplest function, gives you the MD5 of a string as 4-tuple of 32bit words.

md5s :: MD5 a => a -> String #

Returns a hex number ala the md5sum program.

md5i :: MD5 a => a -> Integer #

Returns an integer equivalent to hex number from `md5s`.

class MD5 a where #

Anything we want to work out the MD5 of must be an instance of class MD5

Methods

get_next :: a -> ([Word32], Int, a) #

len_pad :: Zord64 -> a -> a #

finished :: a -> Bool #

Instances

MD5 WordList # |
Instance details Defined in Data.Hash.MD5 Methods get_next :: WordList -> ([Word32], Int, WordList) # len_pad :: Zord64 -> WordList -> WordList # finished :: WordList -> Bool #
MD5 BoolList # |
Instance details Defined in Data.Hash.MD5 Methods get_next :: BoolList -> ([Word32], Int, BoolList) # len_pad :: Zord64 -> BoolList -> BoolList # finished :: BoolList -> Bool #
MD5 Str # |
Instance details Defined in Data.Hash.MD5 Methods get_next :: Str -> ([Word32], Int, Str) # len_pad :: Zord64 -> Str -> Str # finished :: Str -> Bool #

newtype ABCD #

Constructors

ABCD (Word32, Word32, Word32, Word32) |

Instances

Eq ABCD # |
Instance details Defined in Data.Hash.MD5 Methods (==) :: ABCD -> ABCD -> Bool # (/=) :: ABCD -> ABCD -> Bool #
Num ABCD # |
Instance details Defined in Data.Hash.MD5 Methods (+) :: ABCD -> ABCD -> ABCD # (-) :: ABCD -> ABCD -> ABCD # (*) :: ABCD -> ABCD -> ABCD # negate :: ABCD -> ABCD # abs :: ABCD -> ABCD # signum :: ABCD -> ABCD # fromInteger :: Integer -> ABCD #
Show ABCD # |
Instance details Defined in Data.Hash.MD5 Methods showsPrec :: Int -> ABCD -> ShowS # show :: ABCD -> String # showList :: [ABCD] -> ShowS #

type Zord64 = Word64 #

newtype Str #

Constructors

Str String |

Instances

MD5 Str # |
Instance details Defined in Data.Hash.MD5 Methods get_next :: Str -> ([Word32], Int, Str) # len_pad :: Zord64 -> Str -> Str # finished :: Str -> Bool #

newtype BoolList #

Constructors

BoolList [Bool] |

Instances

MD5 BoolList # |
Instance details Defined in Data.Hash.MD5 Methods get_next :: BoolList -> ([Word32], Int, BoolList) # len_pad :: Zord64 -> BoolList -> BoolList # finished :: BoolList -> Bool #

newtype WordList #

Constructors

WordList ([Word32], Zord64) |

Instances

MD5 WordList # |
Instance details Defined in Data.Hash.MD5 Methods get_next :: WordList -> ([Word32], Int, WordList) # len_pad :: Zord64 -> WordList -> WordList # finished :: WordList -> Bool #