MCPcopy Create free account
hub / github.com/SaadAhla/FilelessPELoader / AESencrypt

Function AESencrypt

aes.py:7–13  ·  view source on GitHub ↗
(plaintext, key)

Source from the content-addressed store, hash-verified

5import hashlib
6
7def AESencrypt(plaintext, key):
8 k = hashlib.sha256(KEY).digest()
9 iv = 16 * b'\x00'
10 plaintext = pad(plaintext, AES.block_size)
11 cipher = AES.new(k, AES.MODE_CBC, iv)
12 ciphertext = cipher.encrypt(plaintext)
13 return ciphertext,key
14
15def dropFile(key, ciphertext):
16 with open("cipher.bin", "wb") as fc:

Callers 1

aes.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected