MCPcopy Create free account
hub / github.com/ActiveState/code / bin2hex

Function bin2hex

recipes/Python/576598_Utility_Mill_Test/recipe-576598.py:165–166  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

163 return decoded
164
165def bin2hex(x):
166 return ''.join('%02X' % ord(y) for y in x)
167
168def hex2bin(x):
169 return ''.join(chr(int(x[y:y+2], 16)) for y in range(0, len(x), 2))

Callers 2

test_encodeFunction · 0.85
test_decodeFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by 2

test_encodeFunction · 0.68
test_decodeFunction · 0.68