Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 - Allow ScryptFile mode 'r' as long as underlying file is 'rb'. #4

Open
ricmoo opened this issue Jan 21, 2015 · 0 comments
Open
Assignees

Comments

@ricmoo
Copy link
Owner

ricmoo commented Jan 21, 2015

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'.

@ricmoo ricmoo self-assigned this Jan 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant