I'm trying to encrypt files like PDFs or executables, but I can't pad it.
I try to read the file in this method:
with('file', 'rb') as file_read:
line = file_read.read(n) --> n multple of 16
encrypt(line, key)
Then I pass the line to my encrypt function, but when I reach a line that isn't a multiple of 16, my program crashes.
How can I correctly pad a sequence of bytes?
encryptfunction?