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