Safe Haskell | None |
---|---|
Language | Haskell2010 |
Structured representations of SDMF capabilities.
Synopsis
- data SDMF
- data Verifier = Verifier {
- verifierStorageIndex :: StorageIndex
- verifierVerificationKeyHash :: Digest SHA256
- data Reader = Reader {}
- data Writer = Writer {}
- deriveReader :: Write -> Digest SHA256 -> Maybe Reader
- deriveVerifier :: Read -> Digest SHA256 -> Verifier
- type Parser = Parsec Void Text
- pCapability :: Parser SDMF
- pVerifier :: Parser Verifier
- pReader :: Parser Reader
- pWriter :: Parser Writer
- pPieces :: Text -> (ByteString -> a) -> Parser (a, Digest SHA256)
- pBase32 :: [Char] -> Word16 -> Parser ByteString
- rfc3548Alphabet :: [Char]
- dangerRealShow :: SDMF -> Text
Documentation
Any kind of SDMF capability.
A verify capability for an SDMF object.
Verifier | |
|
A read capability for an SDMF object.
A write capability for an SDMF object.
deriveReader :: Write -> Digest SHA256 -> Maybe Reader Source #
Diminish a write key to a read key and wrap it in a reader capability.
deriveVerifier :: Read -> Digest SHA256 -> Verifier Source #
Diminish a read key to a verify key and wrap it in a verifier capability.
pCapability :: Parser SDMF Source #
A parser for any kind of SDMF capability type.
:: Text | The prefix to expect. |
-> (ByteString -> a) | A function to convert the first bytestring to a result value. |
-> Parser (a, Digest SHA256) | A parser for the two pieces of the SDMF capability. |
A parser for two base32-encoded bytestrings with some given prefix, formatted as they are in the string representation of an SDMF capability.
:: [Char] | The alphabet to use. For example, *rfc3548Alphabet*. |
-> Word16 | The number of bits in the encoded byte string. |
-> Parser ByteString | A parser for the byte string. Strings that are not valid base32 will be rejected. Strings that are the wrong length are *not necessarily* currently rejected! Please fix that, somebody. |
A parser combinator for an arbitrary byte string of a fixed length, encoded using base32.
TODO: Avoid duplicating this implementation here and in tahoe-chk.
rfc3548Alphabet :: [Char] Source #
The RFC3548 standard alphabet used by Gnutella, Content-Addressable Web, THEX, Bitzi, Web-Calculus...
dangerRealShow :: SDMF -> Text Source #
Deprecated: Use the ConfidentialShowable instance
Show an SDMF capability, including all secret information.