mervick / aes-everywhere

Aes Everywhere - Cross Language AES 256 Encryption Library (Bash, Powershell, C#, Dart, GoLang, Java, JavaScript, Lua, PHP, Python, Ruby, Swift)
Other
474 stars 169 forks source link

(Python) TypeError: must be str, not bytes: line 89, in __derive_key_and_iv #2

Closed atishagrawal closed 6 years ago

atishagrawal commented 6 years ago

I am getting this error

line 89, in __derive_key_and_iv
    d_i = md5(d_i + password + salt).digest()
TypeError: must be str, not bytes

when I am trying to execute the python code

I am using it like this:

print(aes256.aes256().encrypt("Hello World", "pass"))

mervick commented 6 years ago

python version ?

atishagrawal commented 6 years ago

Python 3.6.5

mervick commented 6 years ago

Fixed here https://github.com/mervick/aes-everywhere/commit/54638742430ef9eb60664cab793cbaf8bfac98e7