Liking cljdoc? Tell your friends :D

vaelii.impl.io.digest

The content digest of a stored sentex: "sha256:" and the 64 lowercase hex characters of a SHA-256 over the sentex's context, sign and canonical sentence, encoded by encode!. A (sentexHandle n) inside the sentence digests as the identity of the record n names, so two stores holding one sentex compute one digest for it. A digest is a checksum and locates nothing: a delta carries one per reference, and a merge compares it with the digest of the sentex the reference resolves to. See docs/storage.md, "Content digests".

The **content digest** of a stored sentex: `"sha256:"` and the 64 lowercase hex
characters of a SHA-256 over the sentex's context, sign and canonical sentence, encoded
by `encode!`.  A `(sentexHandle n)` inside the sentence digests as the identity of the
record `n` names, so two stores holding one sentex compute one digest for it.  A digest
is a checksum and locates nothing: a delta carries one per reference, and a merge
compares it with the digest of the sentex the reference resolves to.  See
docs/storage.md, "Content digests".
raw docstring

digestclj

(digest kb handle)

The digest of the stored sentex at handle, or nil when the handle names no record. Throws :not-encodable for a sentence holding a value encode! does not cover.

The digest of the stored sentex at `handle`, or nil when the handle names no record.
Throws `:not-encodable` for a sentence holding a value `encode!` does not cover.
sourceraw docstring

digest?clj

(digest? x)

Is x a digest string — "sha256:" then 64 lowercase hex characters?

Is `x` a digest string — `"sha256:"` then 64 lowercase hex characters?
sourceraw docstring

digesterclj

(digester kb)

A fn from a handle of kb to its digest, nil for a handle naming no record or a record holding a value the encoding does not cover. One memo serves every call, so a caller holds it across no write.

A fn from a handle of `kb` to its digest, nil for a handle naming no record or a record
holding a value the encoding does not cover.  One memo serves every call, so a caller
holds it across no write.
sourceraw docstring

digestsclj

(digests kb handles provenance?)

The digests of the stored sentexes at handles, in order, nil where a handle names no record, digesting each record a chain of references names once. With provenance?, each digest covers [creator created identity] from the record's provenance, so it changes when the provenance does.

The digests of the stored sentexes at `handles`, in order, nil where a handle names no
record, digesting each record a chain of references names once.  With `provenance?`,
each digest covers `[creator created identity]` from the record's provenance, so it
changes when the provenance does.
sourceraw docstring

unstored-digestclj

(unstored-digest kb csx)

The digest a canonical sentex csx (res/kb-sentex) holds once stored, computed without storing it. A sentence naming the record it would be stored as has a digest only once stored, since the reference is a back-reference to its own frame.

The digest a canonical sentex `csx` (`res/kb-sentex`) holds once stored, computed
without storing it.  A sentence naming the record it would be stored as has a digest
only once stored, since the reference is a back-reference to its own frame.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close