Total Complexity | 1 |
Total Lines | 16 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
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 |