· 7 years ago · Jun 27, 2018, 03:18 PM
1import subprocess
2subprocess.check_call(["attrib","+H","myfile.txt"])
3
4from Crypto.Cipher import AES
5import base64
6
7text = 'TOP SECRET TEXT'.rjust(32) #текÑÑ‚ который мы хотим зашифровать
8secret_key = 'qwerty'.rjust(32) # пароль
9
10cipher = AES.new(secret_key,AES.MODE_ECB)
11encoded = base64.b64encode(cipher.encrypt(text)) # зашифрованный текÑÑ‚
12decoded = cipher.decrypt(base64.b64decode(encoded)) # раÑшифорванный текÑÑ‚