summaryrefslogtreecommitdiff
path: root/lib/Compat.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Compat.hs')
-rw-r--r--lib/Compat.hs5
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 #-}
2module Compat where 1module Compat where
3 2
4import Data.Bits 3import Data.Bits
@@ -8,8 +7,6 @@ import Data.ASN1.Encoding
8import Data.ASN1.BinaryEncoding 7import Data.ASN1.BinaryEncoding
9import Crypto.PubKey.RSA as RSA 8import Crypto.PubKey.RSA as RSA
10 9
11#if defined(VERSION_cryptonite)
12
13instance ASN1Object PublicKey where 10instance 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
46toPositive :: Integer -> Integer 41toPositive :: Integer -> Integer
47toPositive int 42toPositive int
48 | int < 0 = uintOfBytes $ bytesOfInt int 43 | int < 0 = uintOfBytes $ bytesOfInt int