File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ library
52
52
Cardano.Crypto.Hash.Class
53
53
Cardano.Crypto.Hash.Keccak256
54
54
Cardano.Crypto.Hash.NeverUsed
55
+ Cardano.Crypto.Hash.RIPEMD160
55
56
Cardano.Crypto.Hash.SHA256
56
57
Cardano.Crypto.Hash.SHA3_256
57
58
Cardano.Crypto.Hash.Short
Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE DataKinds #-}
2
+ {-# LANGUAGE PackageImports #-}
3
+ {-# LANGUAGE TypeFamilies #-}
4
+
5
+ -- | Implementation of the RIPEMD-160 hashing algorithm.
6
+ module Cardano.Crypto.Hash.RIPEMD160
7
+ ( RIPEMD160
8
+ )
9
+ where
10
+ import Cardano.Crypto.Hash.Class
11
+ import qualified "cryptonite" Crypto.Hash as H
12
+ import qualified Data.ByteArray as BA
13
+
14
+ data RIPEMD160
15
+
16
+ instance HashAlgorithm RIPEMD160 where
17
+ type SizeHash RIPEMD160 = 20
18
+ hashAlgorithmName _ = " RIPEMD160"
19
+ digest _ = convert . H. hash
20
+
21
+ convert :: H. Digest H. RIPEMD160 -> ByteString
22
+ convert = BA. convert
23
+
You can’t perform that action at this time.
0 commit comments