Since Python 3, it differs between bytes (raw bytes, no known encoding, binary data) and strings (encoded default with utf8).
Using encryption in Python 3 requires always bytes.
To reduce the pain, you could always use strings as long as you can and when a function requires bytes, then encode them at this place.
If you want to encrypt binary files, you have to open them in binary mode.
str.encode() -> bytes
bytes.decode() -> str
Using encryption in Python 3 requires always bytes.
To reduce the pain, you could always use strings as long as you can and when a function requires bytes, then encode them at this place.
If you want to encrypt binary files, you have to open them in binary mode.
str.encode() -> bytes
bytes.decode() -> str
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!