Conditions | 4 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
1 | # -*- coding: utf-8 -*- |
||
10 | def _format_digest(hexdigest): # pragma: no cover |
||
11 | parts = [] |
||
12 | hexdigest_size = int(len(hexdigest) / 2) |
||
13 | for i in range(hexdigest_size): |
||
14 | part = hexdigest[i * 2:(i * 2) + 2] |
||
15 | if part == '00': |
||
16 | part = '' |
||
17 | elif part.startswith('0'): |
||
18 | part = part[1:] |
||
19 | parts.append(part) |
||
20 | return (''.join(parts)).upper() |
||
21 | |||
34 |