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