10 lines
230 B
Python
10 lines
230 B
Python
from crypt import *
|
|
from Crypto.Random import get_random_bytes
|
|
|
|
key = get_random_bytes(32) # 32 bytes * 8 = 256 bits (1 byte = 8 bits)
|
|
print(key)
|
|
|
|
encrypt_file(key, 'original_file.txt')
|
|
|
|
decrypt_file(key, 'original_file.txt.enc')
|