]> git.immae.eu Git - github/fretlink/hmacaroons.git/commitdiff
Haddock markup
authorJulien Tanguy <julien.tanguy@jhome.fr>
Wed, 6 May 2015 11:53:36 +0000 (13:53 +0200)
committerJulien Tanguy <julien.tanguy@jhome.fr>
Wed, 6 May 2015 11:53:36 +0000 (13:53 +0200)
[ci skip]

src/Crypto/Macaroon/Internal.hs
src/Crypto/Macaroon/Serializer/Base64.hs

index ebd25cb4eea0957f4fddb302a2abeb01eda7e278..02b7963c19c5deca88e5abb3f3c545bce6c9961c 100644 (file)
@@ -44,6 +44,7 @@ data Macaroon = MkMacaroon { location   :: Location
                            -- ^ Macaroon HMAC signature
                            }
 
+-- | Constant-time Eq instance
 instance Eq Macaroon where
     (MkMacaroon l1 i1 c1 s1) == (MkMacaroon l2 i2 c2 s2) =
         (l1 `constEqBytes` l2) &&!
@@ -76,6 +77,7 @@ data Caveat = MkCaveat { cid :: Key
                        -- ^ Caveat target location
                        }
 
+-- | Constant-time Eq instance
 instance Eq Caveat where
     (MkCaveat c1 v1 l1) == (MkCaveat c2 v2 l2) =
         (c1 `constEqBytes` c2) &&!
index f6527c2e6432aa008d1a425c288c217c25cc9972..053d9673b3d1217a32825e489b48b3f4a590e8c6 100644 (file)
@@ -55,6 +55,7 @@ packetize key dat = do
     putByteString dat
     putByteString "\n"
 
+-- | Deserialize a macaroon from a base64url-encoded ByteString
 deserialize :: BS.ByteString -> Either String Macaroon
 deserialize = parseOnly macaroon . B64.decodeLenient