API Reference¶
-
multibase.
encode
(encoding, data)[source]¶ Encodes the given data using the encoding that is specified
Parameters: - encoding (str) – encoding to use, should be one of the supported encoding
- data (str or bytes) – data to encode
Returns: multibase encoded data
Return type: bytes
Raises: ValueError – if the encoding is not supported
-
multibase.
decode
(data)[source]¶ Decode the multibase decoded data :param data: multibase encoded data :type data: str or bytes :return: decoded data :rtype: str :raises ValueError: if the data is not multibase encoded