(data, args)
| 12 | |
| 13 | |
| 14 | def 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 |
nothing calls this directly
no test coverage detected