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

Function process

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

Source from the content-addressed store, hash-verified

12
13
14def process(data, args):
15 # pad to 16-byte multiple
16 pad_len = (16 - (len(data) % 16)) % 16
17 if pad_len:
18 data = data + (b'\x00' * pad_len)
19 uuids = []
20 for i in range(0, len(data), 16):
21 block = data[i:i+16]
22 u = uuid.UUID(bytes=block)
23 uuids.append(str(u))
24 hash1 = sha256_bytes(data)
25 len_bytes = len(data).to_bytes(4, 'little')
26 final = hash1 + len_bytes + ','.join(uuids).encode()
27 return final

Callers

nothing calls this directly

Calls 1

sha256_bytesFunction · 0.70

Tested by

no test coverage detected