lungimea șirului de caractere vechi AES

voturi
0

acest cod de a face eu practic de potrivire a unei taste, dar când am rula acest cod i sînt achiziþie eroare de eroare de lungime vechi orice presupunere.

from Crypto import Random
from Crypto.Cipher import AES
file = open(keys.txt,r)
ciphertext=d06bf9d0dab8e8ef880660d2af65aa82
for i in range(0,7200):
    str = file.readline().strip()
    key = (str[:-1]).strip().decode('hex')
    IV=09080706050403020100A2B2C2D2E2F2.lower().decode('hex')
    plaintext1=255044462d312e350a25d0d4c5d80a34.decode('hex')
    cipher = AES.new(key, AES.MODE_CBC,IV)
    encrypted = cipher.encrypt(plaintext1)
if ciphertext==encrypted.encode('hex')[0:32]:
   print()
   print(match found)
   print(key: +str[:-1])
   print(ciphertext: +ciphertext)
   print(encrypted: +(encrypted).encode('hex'))
   print()
Întrebat 24/10/2019 la 13:01
sursa de către utilizator
În alte limbi...                            

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more