Just an idea for a future enhancement.
Basically on Python 3, the binary file must be opened with the 'rb' mode and I check that the ScryptFile mode matches the file pointer mode.
Since Python 3 makes a distinction between what things like read() return, (bytes for 'rb', strings for 'r') it would be convenient to have the underlying file object opened as 'rb' (which it must be, since the encrypted file is binary) but specify the ScryptFile mode as 'r'. Then read could perform whatever text conversion the built-in file object performs in the case of 'r' vs 'rb'.
Just an idea for a future enhancement.
Basically on Python 3, the binary file must be opened with the 'rb' mode and I check that the ScryptFile mode matches the file pointer mode.
Since Python 3 makes a distinction between what things like
read()return, (bytes for 'rb', strings for 'r') it would be convenient to have the underlying file object opened as 'rb' (which it must be, since the encrypted file is binary) but specify the ScryptFile mode as 'r'. Then read could perform whatever text conversion the built-in file object performs in the case of 'r' vs 'rb'.