diff --git a/Crypto/Hash/Blake2bp.hs b/Crypto/Hash/Blake2bp.hs index 7a555d9..b2053f2 100644 --- a/Crypto/Hash/Blake2bp.hs +++ b/Crypto/Hash/Blake2bp.hs @@ -30,20 +30,20 @@ data Blake2bp_512 = Blake2bp_512 instance HashAlgorithm Blake2bp_512 where type HashBlockSize Blake2bp_512 = 128 type HashDigestSize Blake2bp_512 = 64 - type HashInternalContextSize Blake2bp_512 = 2325 + type HashInternalContextSize Blake2bp_512 = 1768 hashBlockSize _ = 128 hashDigestSize _ = 64 - hashInternalContextSize _ = 2325 - hashInternalInit p = c_blake2sp_init p 512 - hashInternalUpdate = c_blake2sp_update - hashInternalFinalize p = c_blake2sp_finalize p 512 + hashInternalContextSize _ = 1768 + hashInternalInit p = c_blake2bp_init p 512 + hashInternalUpdate = c_blake2bp_update + hashInternalFinalize p = c_blake2bp_finalize p 512 -foreign import ccall unsafe "cryptonite_blake2sp_init" - c_blake2sp_init :: Ptr (Context a) -> Word32 -> IO () +foreign import ccall unsafe "cryptonite_blake2bp_init" + c_blake2bp_init :: Ptr (Context a) -> Word32 -> IO () -foreign import ccall "cryptonite_blake2sp_update" - c_blake2sp_update :: Ptr (Context a) -> Ptr Word8 -> Word32 -> IO () +foreign import ccall "cryptonite_blake2bp_update" + c_blake2bp_update :: Ptr (Context a) -> Ptr Word8 -> Word32 -> IO () -foreign import ccall unsafe "cryptonite_blake2sp_finalize" - c_blake2sp_finalize :: Ptr (Context a) -> Word32 -> Ptr (Digest a) -> IO () +foreign import ccall unsafe "cryptonite_blake2bp_finalize" + c_blake2bp_finalize :: Ptr (Context a) -> Word32 -> Ptr (Digest a) -> IO () diff --git a/Crypto/Hash/Blake2sp.hs b/Crypto/Hash/Blake2sp.hs index 2aaa041..869dd6e 100644 --- a/Crypto/Hash/Blake2sp.hs +++ b/Crypto/Hash/Blake2sp.hs @@ -30,10 +30,10 @@ data Blake2sp_224 = Blake2sp_224 instance HashAlgorithm Blake2sp_224 where type HashBlockSize Blake2sp_224 = 64 type HashDigestSize Blake2sp_224 = 28 - type HashInternalContextSize Blake2sp_224 = 2185 + type HashInternalContextSize Blake2sp_224 = 1752 hashBlockSize _ = 64 hashDigestSize _ = 28 - hashInternalContextSize _ = 2185 + hashInternalContextSize _ = 1752 hashInternalInit p = c_blake2sp_init p 224 hashInternalUpdate = c_blake2sp_update hashInternalFinalize p = c_blake2sp_finalize p 224 @@ -45,10 +45,10 @@ data Blake2sp_256 = Blake2sp_256 instance HashAlgorithm Blake2sp_256 where type HashBlockSize Blake2sp_256 = 64 type HashDigestSize Blake2sp_256 = 32 - type HashInternalContextSize Blake2sp_256 = 2185 + type HashInternalContextSize Blake2sp_256 = 1752 hashBlockSize _ = 64 hashDigestSize _ = 32 - hashInternalContextSize _ = 2185 + hashInternalContextSize _ = 1752 hashInternalInit p = c_blake2sp_init p 256 hashInternalUpdate = c_blake2sp_update hashInternalFinalize p = c_blake2sp_finalize p 256 diff --git a/gen/Gen.hs b/gen/Gen.hs index 5540f67..c2e43ad 100644 --- a/gen/Gen.hs +++ b/gen/Gen.hs @@ -59,9 +59,9 @@ data HashCustom = hashModules = -- module header hash ctx dg blk [ GenHashModule "Blake2s" "blake2.h" "blake2s" 136 (HashMulti [] [(160, 64), (224,64), (256,64)]) - , GenHashModule "Blake2sp" "blake2.h" "blake2sp" 2185 (HashMulti [] [(224,64), (256,64)]) + , GenHashModule "Blake2sp" "blake2.h" "blake2sp" 1752 (HashMulti [] [(224,64), (256,64)]) , GenHashModule "Blake2b" "blake2.h" "blake2b" 248 (HashMulti [] [(160, 128), (224, 128), (256, 128), (384, 128), (512,128)]) - , GenHashModule "Blake2bp" "blake2.h" "blake2sp" 2325 (HashMulti [] [(512,128)]) + , GenHashModule "Blake2bp" "blake2.h" "blake2bp" 1768 (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)