Skip to main content

Crate nibkeep_base

Crate nibkeep_base 

Source
Expand description

Identifiers, hashes and the canonical CBOR encoding of NibKeep.

Everything NibKeep stores, hashes, signs or syncs is encoded with cbor, a strict subset of CBOR in which every value has exactly one encoding. Content is identified by its Hash, and entities, spaces and people by random identifiers such as EntityId. The formats are specified in docs/spec/encoding.md.

This crate does no I/O. In particular, it never reads the operating system’s random number generator: callers pass in the random bytes for new identifiers.

Modules§

cbor
Canonical CBOR: a strict subset of CBOR (RFC 8949) in which every value has exactly one encoding.
small
Sets and maps that are small in memory while they are small in size.

Structs§

ChangeId
The ID of a change: the BLAKE3 hash of its encoding.
EntityId
Identifies an entity: a person, a photo, a book, a list or anything else.
Hash
The hash of some content, together with the algorithm that produced it.
Hasher
Computes a Hash incrementally, for content that arrives in pieces.
ParseIdError
The error returned for text that is not an identifier in its text form.
PersonId
Identifies a person who uses NibKeep.
SpaceId
Identifies a space, the unit of sharing, sync and encryption.
StatementId
Identifies a statement: one value of one field of an entity, with its qualifiers.

Enums§

HashAlgorithm
The algorithms that produce hashes (Hash).
ParseHashError
Why a hash could not be read.