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

Function process

encrypt_lib/ipv4.py:15–25  ·  view source on GitHub ↗
(data, args)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

bytes_to_ipv4Function · 0.85
sha256_bytesFunction · 0.70

Tested by

no test coverage detected