summaryrefslogtreecommitdiff
path: root/Compat.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Compat.hs')
-rw-r--r--Compat.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Compat.hs b/Compat.hs
index 43f62c0..3b77851 100644
--- a/Compat.hs
+++ b/Compat.hs
@@ -1,3 +1,4 @@
1{-# LANGUAGE CPP #-}
1module Compat where 2module Compat where
2 3
3import Data.Bits 4import Data.Bits
@@ -7,6 +8,8 @@ import Data.ASN1.Encoding
7import Data.ASN1.BinaryEncoding 8import Data.ASN1.BinaryEncoding
8import Crypto.PubKey.RSA as RSA 9import Crypto.PubKey.RSA as RSA
9 10
11#if defined(VERSION_cryptonite)
12
10instance ASN1Object PublicKey where 13instance ASN1Object PublicKey where
11 toASN1 pubKey = \xs -> Start Sequence 14 toASN1 pubKey = \xs -> Start Sequence
12 : IntVal (public_n pubKey) 15 : IntVal (public_n pubKey)
@@ -38,6 +41,7 @@ instance ASN1Object PublicKey where
38 fromASN1 _ = 41 fromASN1 _ =
39 Left "fromASN1: RSA.PublicKey: unexpected format" 42 Left "fromASN1: RSA.PublicKey: unexpected format"
40 43
44#endif
41 45
42toPositive :: Integer -> Integer 46toPositive :: Integer -> Integer
43toPositive int 47toPositive int