Liking cljdoc? Tell your friends :D

multiformats.cid

CID is a self-describing content-addressed identifier. It uses cryptographic hashing to identify content, multicodec packed codes to label the content type, and multibase to encode the final identifier into a string.

https://github.com/ipld/cid

CID is a self-describing content-addressed identifier. It uses cryptographic
hashing to identify content, multicodec packed codes to label the content
type, and multibase to encode the final identifier into a string.

https://github.com/ipld/cid
raw docstring

ContentIDcljs

source

createclj/s

(create codec mhash)

Construct a new v1 content identifier for a known codec type and multihash.

Construct a new v1 content identifier for a known codec type and multihash.
sourceraw docstring

decodeclj/s

(decode data)

Decode a content identifier from a byte array.

Decode a content identifier from a byte array.
sourceraw docstring

encodeclj/s

(encode cid)

Encode a content identifier into a binary representation. Returns the byte array.

Encode a content identifier into a binary representation. Returns the byte
array.
sourceraw docstring

formatclj/s

(format cid)
(format base cid)

Format a CID into a string representation. Returns a multibase-prefixed string representing the encoded value. Uses base32 if not otherwise specified.

Format a CID into a string representation. Returns a multibase-prefixed
string representing the encoded value. Uses base32 if not otherwise
specified.
sourceraw docstring

inspectclj/s

(inspect x)

Inspect a CID, encoded byte array, or string and return a map of information about the content identifier.

Inspect a CID, encoded byte array, or string and return a map of information
about the content identifier.
sourceraw docstring

parseclj/s

(parse string)

Parse a content identifier from a base-encoded string.

Parse a content identifier from a base-encoded string.
sourceraw docstring

read-bytesclj/s

(read-bytes data offset)

Read a content identifier from a byte array. Returns a tuple containing the CID and the number of bytes read.

Read a content identifier from a byte array. Returns a tuple containing the
CID and the number of bytes read.
sourceraw docstring

write-bytesclj/s

(write-bytes cid buffer offset)

Write an encoded content identifier to a byte array at the given offset. Returns the number of bytes written.

Write an encoded content identifier to a byte array at the given offset.
Returns the number of bytes written.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close