MCPcopy Create free account
hub / github.com/echQoQ/RustSL / process

Function process

encrypt_lib/mac.py:14–24  ·  view source on GitHub ↗
(data, args)

Source from the content-addressed store, hash-verified

12 return '-'.join(f'{x:02X}' for x in b)
13
14def process(data, args):
15 addresses = []
16 for i in range(0, len(data), 6):
17 mac_bytes = data[i:i+6]
18 if len(mac_bytes) < 6:
19 mac_bytes += b'\x00' * (6 - len(mac_bytes))
20 addresses.append(bytes_to_mac(mac_bytes))
21 hash1 = sha256_bytes(data)
22 len_bytes = len(data).to_bytes(4, 'little')
23 final = hash1 + len_bytes + ','.join(addresses).encode()
24 return final

Callers

nothing calls this directly

Calls 2

bytes_to_macFunction · 0.85
sha256_bytesFunction · 0.70

Tested by

no test coverage detected