content_hash.decodes.hex_multi_hash   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 16
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A decode() 0 10 1
1
"""Decode module for HEX multi hash."""
2
3
from multiformats import multihash, CID
4
5
6
def decode(value):
7
    """
8
    Decode HEX multi hash.
9
10
    :param bytes value: an encoded content
11
12
    :return: the decoded content
13
    :rtype: str
14
    """
15
    return multihash.unwrap(CID.decode(value).digest).hex()
16