Core multihash type definition and helper methods.
algorithm-codesMap of information about the available content hashing algorithms.
app-code?(app-code? code)
True if the given code number is assigned to the application-specfic range. Returns nil if the argument is not an integer.
base58(base58 mhash)
Encodes a multihash into a Base-58 string.
create(create algorithm digest)
Constructs a new Multihash identifier. Accepts either a numeric algorithm code or a keyword name as the first argument. The digest may either by a byte array or a hex string.
Decodable protocolThis protocol provides a method for data sources which a multihash can be read from.
members decode(decode source)
Attempts to read a multihash value from the data source.
decode-array(decode-array encoded)
Decodes a byte array directly into multihash. Throws ex-info
with a :type
of :multihash/bad-input
if the data is malformed or invalid.
(encode mhash)
Encodes a multihash into a binary representation.
get-algorithm(get-algorithm value)
Looks up an algorithm by keyword name or code number. Returns nil
if the value does not map to any valid algorithm.
(hex mhash)
Encodes a multihash into a hexadecimal string.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4