Digest functions for creating new multihash constructors.
Digest functions for creating new multihash constructors.
(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.
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.
(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.
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close