Files
2026-01-30 17:47:21 +08:00

12 lines
272 B
Python

def change_endian(hex_str: str) -> str:
# Convert hex string to bytes
buffer = bytes.fromhex(hex_str)
# Reverse the byte order
endian = buffer[::-1]
# Convert back to hex string
result = endian.hex()
return result
__all__ = ["change_endian"]