MCPcopy Index your code
hub / github.com/lzhoang2801/OpCore-Simplify / hex_to_bytes

Method hex_to_bytes

Scripts/utils.py:97–106  ·  view source on GitHub ↗
(self, string)

Source from the content-addressed store, hash-verified

95 os.makedirs(path)
96
97 def hex_to_bytes(self, string):
98 try:
99 hex_string = re.sub(r'[^0-9a-fA-F]', '', string)
100
101 if len(re.sub(r"\s+", "", string)) != len(hex_string):
102 return string
103
104 return binascii.unhexlify(hex_string)
105 except binascii.Error:
106 return string
107
108 def int_to_hex(self, number):
109 return format(number, '02X')

Callers 6

add_booter_patchMethod · 0.80
devicepropertiesMethod · 0.80
load_kernel_patchMethod · 0.80
genarateMethod · 0.80
apply_acpi_patchesMethod · 0.80
dropping_the_tableMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected