diff options
author | Julien Tanguy <julien.tanguy@jhome.fr> | 2015-05-06 13:53:36 +0200 |
---|---|---|
committer | Julien Tanguy <julien.tanguy@jhome.fr> | 2015-05-06 13:53:36 +0200 |
commit | 7986de7cc40d5c063805b060c1796623d3584995 (patch) | |
tree | 646eff653b1747cd452e0e1349c6622e3d078407 /src/Crypto/Macaroon/Internal.hs | |
parent | c1e083c0be9f3791fa5527533a33eef63ebef497 (diff) | |
download | hmacaroons-7986de7cc40d5c063805b060c1796623d3584995.tar.gz hmacaroons-7986de7cc40d5c063805b060c1796623d3584995.tar.zst hmacaroons-7986de7cc40d5c063805b060c1796623d3584995.zip |
Haddock markup
[ci skip]
Diffstat (limited to 'src/Crypto/Macaroon/Internal.hs')
-rw-r--r-- | src/Crypto/Macaroon/Internal.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Crypto/Macaroon/Internal.hs b/src/Crypto/Macaroon/Internal.hs index ebd25cb..02b7963 100644 --- a/src/Crypto/Macaroon/Internal.hs +++ b/src/Crypto/Macaroon/Internal.hs | |||
@@ -44,6 +44,7 @@ data Macaroon = MkMacaroon { location :: Location | |||
44 | -- ^ Macaroon HMAC signature | 44 | -- ^ Macaroon HMAC signature |
45 | } | 45 | } |
46 | 46 | ||
47 | -- | Constant-time Eq instance | ||
47 | instance Eq Macaroon where | 48 | instance Eq Macaroon where |
48 | (MkMacaroon l1 i1 c1 s1) == (MkMacaroon l2 i2 c2 s2) = | 49 | (MkMacaroon l1 i1 c1 s1) == (MkMacaroon l2 i2 c2 s2) = |
49 | (l1 `constEqBytes` l2) &&! | 50 | (l1 `constEqBytes` l2) &&! |
@@ -76,6 +77,7 @@ data Caveat = MkCaveat { cid :: Key | |||
76 | -- ^ Caveat target location | 77 | -- ^ Caveat target location |
77 | } | 78 | } |
78 | 79 | ||
80 | -- | Constant-time Eq instance | ||
79 | instance Eq Caveat where | 81 | instance Eq Caveat where |
80 | (MkCaveat c1 v1 l1) == (MkCaveat c2 v2 l2) = | 82 | (MkCaveat c1 v1 l1) == (MkCaveat c2 v2 l2) = |
81 | (c1 `constEqBytes` c2) &&! | 83 | (c1 `constEqBytes` c2) &&! |