[blake2] uncapitalize the modules and types as it's not abbreviation.

This commit is contained in:
Vincent Hanquez 2015-11-19 14:24:54 +00:00
parent 081a14326e
commit 812b5d1aed
8 changed files with 45 additions and 45 deletions

View File

@ -10,10 +10,10 @@
module Crypto.Hash.Algorithms
( HashAlgorithm
-- * hash algorithms
, BLAKE2s_256(..)
, BLAKE2sp_256(..)
, BLAKE2b_512(..)
, BLAKE2bp_512(..)
, Blake2s_256(..)
, Blake2sp_256(..)
, Blake2b_512(..)
, Blake2bp_512(..)
, MD2(..)
, MD4(..)
, MD5(..)
@ -44,10 +44,10 @@ module Crypto.Hash.Algorithms
) where
import Crypto.Hash.Types (HashAlgorithm)
import Crypto.Hash.BLAKE2s
import Crypto.Hash.BLAKE2sp
import Crypto.Hash.BLAKE2b
import Crypto.Hash.BLAKE2bp
import Crypto.Hash.Blake2s
import Crypto.Hash.Blake2sp
import Crypto.Hash.Blake2b
import Crypto.Hash.Blake2bp
import Crypto.Hash.MD2
import Crypto.Hash.MD4
import Crypto.Hash.MD5

View File

@ -1,16 +1,16 @@
-- |
-- Module : Crypto.Hash.BLAKE2b
-- Module : Crypto.Hash.Blake2b
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- module containing the binding functions to work with the
-- BLAKE2b cryptographic hash.
-- Blake2b cryptographic hash.
--
{-# LANGUAGE ForeignFunctionInterface #-}
module Crypto.Hash.BLAKE2b
( BLAKE2b_512 (..)
module Crypto.Hash.Blake2b
( Blake2b_512 (..)
) where
import Crypto.Hash.Types
@ -18,11 +18,11 @@ import Foreign.Ptr (Ptr)
import Data.Word (Word8, Word32)
-- | BLAKE2b (512 bits) cryptographic hash algorithm
data BLAKE2b_512 = BLAKE2b_512
-- | Blake2b (512 bits) cryptographic hash algorithm
data Blake2b_512 = Blake2b_512
deriving (Show)
instance HashAlgorithm BLAKE2b_512 where
instance HashAlgorithm Blake2b_512 where
hashBlockSize _ = 128
hashDigestSize _ = 64
hashInternalContextSize _ = 361

View File

@ -1,16 +1,16 @@
-- |
-- Module : Crypto.Hash.BLAKE2bp
-- Module : Crypto.Hash.Blake2bp
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- module containing the binding functions to work with the
-- BLAKE2bp cryptographic hash.
-- Blake2bp cryptographic hash.
--
{-# LANGUAGE ForeignFunctionInterface #-}
module Crypto.Hash.BLAKE2bp
( BLAKE2bp_512 (..)
module Crypto.Hash.Blake2bp
( Blake2bp_512 (..)
) where
import Crypto.Hash.Types
@ -18,11 +18,11 @@ import Foreign.Ptr (Ptr)
import Data.Word (Word8, Word32)
-- | BLAKE2bp (512 bits) cryptographic hash algorithm
data BLAKE2bp_512 = BLAKE2bp_512
-- | Blake2bp (512 bits) cryptographic hash algorithm
data Blake2bp_512 = Blake2bp_512
deriving (Show)
instance HashAlgorithm BLAKE2bp_512 where
instance HashAlgorithm Blake2bp_512 where
hashBlockSize _ = 128
hashDigestSize _ = 64
hashInternalContextSize _ = 2325

View File

@ -1,16 +1,16 @@
-- |
-- Module : Crypto.Hash.BLAKE2s
-- Module : Crypto.Hash.Blake2s
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- module containing the binding functions to work with the
-- BLAKE2s cryptographic hash.
-- Blake2s cryptographic hash.
--
{-# LANGUAGE ForeignFunctionInterface #-}
module Crypto.Hash.BLAKE2s
( BLAKE2s_256 (..)
module Crypto.Hash.Blake2s
( Blake2s_256 (..)
) where
import Crypto.Hash.Types
@ -18,11 +18,11 @@ import Foreign.Ptr (Ptr)
import Data.Word (Word8, Word32)
-- | BLAKE2s (256 bits) cryptographic hash algorithm
data BLAKE2s_256 = BLAKE2s_256
-- | Blake2s (256 bits) cryptographic hash algorithm
data Blake2s_256 = Blake2s_256
deriving (Show)
instance HashAlgorithm BLAKE2s_256 where
instance HashAlgorithm Blake2s_256 where
hashBlockSize _ = 64
hashDigestSize _ = 32
hashInternalContextSize _ = 185

View File

@ -1,16 +1,16 @@
-- |
-- Module : Crypto.Hash.BLAKE2sp
-- Module : Crypto.Hash.Blake2sp
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- module containing the binding functions to work with the
-- BLAKE2sp cryptographic hash.
-- Blake2sp cryptographic hash.
--
{-# LANGUAGE ForeignFunctionInterface #-}
module Crypto.Hash.BLAKE2sp
( BLAKE2sp_256 (..)
module Crypto.Hash.Blake2sp
( Blake2sp_256 (..)
) where
import Crypto.Hash.Types
@ -18,11 +18,11 @@ import Foreign.Ptr (Ptr)
import Data.Word (Word8, Word32)
-- | BLAKE2sp (256 bits) cryptographic hash algorithm
data BLAKE2sp_256 = BLAKE2sp_256
-- | Blake2sp (256 bits) cryptographic hash algorithm
data Blake2sp_256 = Blake2sp_256
deriving (Show)
instance HashAlgorithm BLAKE2sp_256 where
instance HashAlgorithm Blake2sp_256 where
hashBlockSize _ = 64
hashDigestSize _ = 32
hashInternalContextSize _ = 2185

View File

@ -149,10 +149,10 @@ Library
Crypto.Hash.MD2
Crypto.Hash.MD4
Crypto.Hash.MD5
Crypto.Hash.BLAKE2s
Crypto.Hash.BLAKE2sp
Crypto.Hash.BLAKE2b
Crypto.Hash.BLAKE2bp
Crypto.Hash.Blake2s
Crypto.Hash.Blake2sp
Crypto.Hash.Blake2b
Crypto.Hash.Blake2bp
Crypto.Hash.RIPEMD160
Crypto.Hash.Skein256
Crypto.Hash.Skein512

View File

@ -53,10 +53,10 @@ data HashCustom =
hashModules =
-- module header hash ctx dg blk
[ GenHashModule "BLAKE2s" "blake2.h" "blake2s" 185 (HashMulti [(256,64)])
, GenHashModule "BLAKE2sp" "blake2.h" "blake2sp" 2185 (HashMulti [(256,64)])
, GenHashModule "BLAKE2b" "blake2.h" "blake2b" 361 (HashMulti [(512,128)])
, GenHashModule "BLAKE2bp" "blake2.h" "blake2sp" 2325 (HashMulti [(512,128)])
[ GenHashModule "Blake2s" "blake2.h" "blake2s" 185 (HashMulti [(256,64)])
, GenHashModule "Blake2sp" "blake2.h" "blake2sp" 2185 (HashMulti [(256,64)])
, GenHashModule "Blake2b" "blake2.h" "blake2b" 361 (HashMulti [(512,128)])
, GenHashModule "Blake2bp" "blake2.h" "blake2sp" 2325 (HashMulti [(512,128)])
, GenHashModule "MD2" "md2.h" "md2" 96 (HashSimple 128 16)
, GenHashModule "MD4" "md4.h" "md4" 96 (HashSimple 128 64)
, GenHashModule "MD5" "md5.h" "md5" 96 (HashSimple 128 64)

View File

@ -138,7 +138,7 @@ expected = [
"a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26",
"01dedd5de4ef14642445ba5f5b97c15e47b9ad931326e4b0727cd94cefc44fff23f07bf543139939b49128caf436dc1bdee54fcb24023a08d9403f9b4bf0d450",
"28e361fe8c56e617caa56c28c7c36e5c13be552b77081be82b642f08bb7ef085b9a81910fe98269386b9aacfd2349076c9506126e198f6f6ad44c12017ca77b1" ])
, ("BLAKE2b-512", HashAlg BLAKE2b_512, [
, ("Blake2b-512", HashAlg Blake2b_512, [
"786a02f742015903c6c6fd852552d272912f4740e15847618a86e217f71f5419d25e1031afee585313896444934eb04b903a685b1448b755d56f701afe9be2ce",
"a8add4bdddfd93e4877d2746e62817b116364a1fa7bc148d95090bc7333b3673f82401cf7aa2e4cb1ecd90296e3f14cb5413f8ed77be73045b13914cdcd6a918",
"af438eea5d8cdb209336a7e85bf58090dc21b49d823f89a7d064c119f127bd361af9c7d109edda0f0e91bdce078d1d86b8e6f25727c98f6d3bb6f50acb2dd376" ])