package capnp-rpc-net

  1. Overview
  2. Docs
Cap'n Proto is a capability-based RPC system with bindings for many languages

Install

dune-project
 Dependency

Authors

Maintainers

Sources

capnp-rpc-2.1.1.tbz
sha256=6e9675034c8eac5873ed511f9b968db5223278145bb02ac4a970053a53970a48
sha512=2e2eb8389071bdad3ceef1d15200bf28987f13319f754f4d1603828d0d79202b4de90a6eb294f12ee088c7e3b73755286fbe7076b8fd3d0b29644221e0e7e080

doc/capnp-rpc-net/Capnp_rpc_net/Restorer/Id/index.html

Module Restorer.IdSource

Sourcetype t

The object ID passed in the Cap'n Proto Bootstrap message.

Sourceval generate : unit -> t

generate () is a fresh unguessable service ID. Note: you must initialise `Nocrypto`'s entropy before calling this (you will get a runtime error if you forget).

Sourceval derived : secret:string -> string -> t

derived ~secret name is a service ID based on secret and name. It is calculated as SHA256.hmac secret name. secret could be the hash of a private key file, for example.

Sourceval public : string -> t

public name is the service ID name. This may be useful for interoperability with non-secure clients that expect to use a plain-text service ID (e.g. "calculator"). It could also be useful if name is some unguessable token you have generated yourself.

Sourceval digest : Auth.hash -> t -> string

digest h id is the digest h id.

Since id is normally a secret token, we must be careful not to allow timing attacks (taking a slightly different amount of time to return an error depending on how much of the ID the caller guessed correctly). Taking a secure hash of the value first is one way to avoid this, since revealing the hash isn't helpful to the attacker.

Sourceval to_string : t -> string

to_string t is the raw bytes of t.

Sourceval pp : t Fmt.t
Sourceval equal : t -> t -> bool