MCPcopy Create free account
hub / github.com/SaadAhla/Shellcode-Hide / AESencrypt

Function AESencrypt

3 - Encrypting/1 - AES/AES_cryptor.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
15
16def printResult(key, ciphertext):

Callers 1

AES_cryptor.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected