Switches the endianness of a hex string (in pairs of hex chars)
(s)
| 21 | settings = {} |
| 22 | |
| 23 | def hex_switchEndian(s): |
| 24 | """ Switches the endianness of a hex string (in pairs of hex chars) """ |
| 25 | pairList = [s[i:i+2].encode() for i in range(0, len(s), 2)] |
| 26 | return b''.join(pairList[::-1]).decode() |
| 27 | |
| 28 | def uint32(x): |
| 29 | return x & 0xffffffff |
no test coverage detected