hashing-0.1.1.0: A pure haskell library implements several hash algorithms.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Crypto.Hash

Description

pure hash interface, supported hash algorithms:

  • SHA1
  • SHA224/SHA256
  • SHA384/SHA512
  • MD5
  • Whirlpool

NOTE: performance is just about 1 / 5 - 1 / 15 of C/ASM implementations.

Synopsis

Documentation

class HashAlgorithm a where Source #

Hash algorithm interface

provides classic init/update/final API. however, user should call higher level API such as hash or hashLazy.

Instances

Instances details
HashAlgorithm MD5 Source # 
Instance details

Defined in Crypto.Hash.MD5

HashAlgorithm SHA1 Source # 
Instance details

Defined in Crypto.Hash.SHA1

HashAlgorithm SHA224 Source # 
Instance details

Defined in Crypto.Hash.SHA256

HashAlgorithm SHA256 Source # 
Instance details

Defined in Crypto.Hash.SHA256

HashAlgorithm SHA384 Source # 
Instance details

Defined in Crypto.Hash.SHA512

HashAlgorithm SHA512 Source # 
Instance details

Defined in Crypto.Hash.SHA512

HashAlgorithm Whirlpool Source # 
Instance details

Defined in Crypto.Hash.Whirlpool

data SHA1 Source #

Instances

Instances details
Show SHA1 Source # 
Instance details

Defined in Crypto.Hash.SHA1

Methods

showsPrec :: Int -> SHA1 -> ShowS #

show :: SHA1 -> String #

showList :: [SHA1] -> ShowS #

Eq SHA1 Source # 
Instance details

Defined in Crypto.Hash.SHA1

Methods

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

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

HashAlgorithm SHA1 Source # 
Instance details

Defined in Crypto.Hash.SHA1

data SHA224 Source #

Instances

Instances details
Show SHA224 Source # 
Instance details

Defined in Crypto.Hash.SHA256

Eq SHA224 Source # 
Instance details

Defined in Crypto.Hash.SHA256

Methods

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

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

HashAlgorithm SHA224 Source # 
Instance details

Defined in Crypto.Hash.SHA256

data SHA256 Source #

Instances

Instances details
Show SHA256 Source # 
Instance details

Defined in Crypto.Hash.SHA256

Eq SHA256 Source # 
Instance details

Defined in Crypto.Hash.SHA256

Methods

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

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

HashAlgorithm SHA256 Source # 
Instance details

Defined in Crypto.Hash.SHA256

data SHA384 Source #

Instances

Instances details
Show SHA384 Source # 
Instance details

Defined in Crypto.Hash.SHA512

Eq SHA384 Source # 
Instance details

Defined in Crypto.Hash.SHA512

Methods

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

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

HashAlgorithm SHA384 Source # 
Instance details

Defined in Crypto.Hash.SHA512

data SHA512 Source #

Instances

Instances details
Show SHA512 Source # 
Instance details

Defined in Crypto.Hash.SHA512

Eq SHA512 Source # 
Instance details

Defined in Crypto.Hash.SHA512

Methods

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

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

HashAlgorithm SHA512 Source # 
Instance details

Defined in Crypto.Hash.SHA512

data MD5 Source #

Instances

Instances details
Show MD5 Source # 
Instance details

Defined in Crypto.Hash.MD5

Methods

showsPrec :: Int -> MD5 -> ShowS #

show :: MD5 -> String #

showList :: [MD5] -> ShowS #

Eq MD5 Source # 
Instance details

Defined in Crypto.Hash.MD5

Methods

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

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

HashAlgorithm MD5 Source # 
Instance details

Defined in Crypto.Hash.MD5

hash :: HashAlgorithm a => ByteString -> a Source #

Hash strict byte string

hashLazy :: HashAlgorithm a => ByteString -> a Source #

Hash lazy byte string