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

Function process

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

Source from the content-addressed store, hash-verified

12
13
14def process(data, args):
15 try:
16 from Crypto.Cipher import ARC4
17 except Exception:
18 raise RuntimeError('pycryptodome is required for rc4 plugin')
19 key = os.urandom(32)
20 cipher = ARC4.new(key)
21 encrypted = cipher.encrypt(data)
22 hash1 = sha256_bytes(data)
23 final = key + hash1 + encrypted
24 return final

Callers

nothing calls this directly

Calls 1

sha256_bytesFunction · 0.70

Tested by

no test coverage detected