add some missing instance of HashAlgorithmASN1
This commit is contained in:
parent
9a0ab88b3d
commit
39cf449ba7
@ -42,6 +42,8 @@ import qualified Crypto.Internal.ByteArray as B
|
||||
class HashAlgorithm hashAlg => HashAlgorithmASN1 hashAlg where
|
||||
hashDigestASN1 :: ByteArray out => Digest hashAlg -> out
|
||||
|
||||
-- http://uk.emc.com/emc-plus/rsa-labs/pkcs/files/h11300-wp-pkcs-1v2-2-rsa-cryptography-standard.pdf
|
||||
-- EMSA-PKCS1-v1_5
|
||||
instance HashAlgorithmASN1 MD2 where
|
||||
hashDigestASN1 = addDigestPrefix [0x30,0x20,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x02,0x05,0x00,0x04,0x10]
|
||||
instance HashAlgorithmASN1 MD5 where
|
||||
@ -56,6 +58,10 @@ instance HashAlgorithmASN1 SHA384 where
|
||||
hashDigestASN1 = addDigestPrefix [0x30,0x41,0x30,0x0d,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x02,0x05,0x00,0x04,0x30]
|
||||
instance HashAlgorithmASN1 SHA512 where
|
||||
hashDigestASN1 = addDigestPrefix [0x30,0x51,0x30,0x0d,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x03,0x05,0x00,0x04,0x40]
|
||||
instance HashAlgorithmASN1 SHA512t_224 where
|
||||
hashDigestASN1 = addDigestPrefix [0x30,0x2d,0x30,0x0d,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x05,0x05,0x00,0x04,0x1c]
|
||||
instance HashAlgorithmASN1 SHA512t_256 where
|
||||
hashDigestASN1 = addDigestPrefix [0x30,0x31,0x30,0x0d,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x06,0x05,0x00,0x04,0x20]
|
||||
instance HashAlgorithmASN1 RIPEMD160 where
|
||||
hashDigestASN1 = addDigestPrefix [0x30,0x21,0x30,0x09,0x06,0x05,0x2b,0x24,0x03,0x02,0x01,0x05,0x00,0x04,0x14]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user