Liking cljdoc? Tell your friends :D

multihash.digest

Digest functions for creating new multihash constructors.

Digest functions for creating new multihash constructors.
raw docstring

defhashcljmacro

(defhash algorithm digest-name)

Defines a new convenience hashing function for the given algorithm and system digest name.

Defines a new convenience hashing function for the given algorithm and system
digest name.
sourceraw docstring

functionsclj

Map of supported multihash algorithm keys to hashing functions. Each function should take a source of binary data as the argument and return a multihash.

Map of supported multihash algorithm keys to hashing functions. Each function
should take a source of binary data as the argument and return a multihash.
sourceraw docstring

sha1clj

(sha1 content)

Calculates the SHA-1 digest of the given byte array or buffer and returns a multihash.

Calculates the SHA-1 digest of the given byte array or buffer and returns a multihash.
sourceraw docstring

sha2-256clj

(sha2-256 content)

Calculates the SHA-256 digest of the given byte array or buffer and returns a multihash.

Calculates the SHA-256 digest of the given byte array or buffer and returns a multihash.
sourceraw docstring

sha2-512clj

(sha2-512 content)

Calculates the SHA-512 digest of the given byte array or buffer and returns a multihash.

Calculates the SHA-512 digest of the given byte array or buffer and returns a multihash.
sourceraw docstring

testclj

(test mhash content)

Determines whether a multihash is a correct identifier for some content by recomputing the digest for the algorithm specified in the multihash. Returns nil if either argument is nil, true if the digest matches, or false if not. Throws an exception if the multihash specifies an unsupported algorithm.

Determines whether a multihash is a correct identifier for some content by
recomputing the digest for the algorithm specified in the multihash. Returns
nil if either argument is nil, true if the digest matches, or false if not.
Throws an exception if the multihash specifies an unsupported algorithm.
sourceraw docstring

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

× close