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

Remove default password #1

Closed
doridori opened this issue Sep 5, 2016 · 4 comments
Closed

Remove default password #1

doridori opened this issue Sep 5, 2016 · 4 comments

Comments

@doridori
Copy link

doridori commented Sep 5, 2016

Hi,

I don't see a need in having a default password as shown in https://github.com/PDDStudio/EncryptedPreferences/blob/master/encrypted-preferences/src/main/java/com/pddstudio/preferences/encrypted/EncryptedPreferences.java#L64 with the method

    private String generateEncryptionString(Context context) {
        return context.getPackageName();
    }

This will either

  1. Be accidentally used and render the lib useless
  2. Be intentionally used and render the lib useless

Neither is satisfactory.

This behaviour is not commented anywhere (README or javadocs) afaik.

I would recommend removing this and making the requirement to supply a password manually - and mention in the README that this needs to not be hardcoded in the app etc.

@PDDStudio
Copy link
Owner

PDDStudio commented Sep 8, 2016

Hey @doridori,

thanks for pointing this out, actually I completely agree with your statement.
The "default" instance creation will be deprecated with the next release version due to security reasons.

This will force developers to specify their own key using the Builder's withEncryptionPassword(String encryptionPassword) method.
If no password is set a RuntimeException will be thrown.

The documentation (readme & javadocs) will be updated accordingly once the new release is ready.

@doridori
Copy link
Author

Thats great :)

Glad to be of service

@PDDStudio
Copy link
Owner

Closing this now, the changes I mentioned above are now live with the latest release version 1.2.0
Also the README and JavaDocs have been updated accordingly.

@doridori
Copy link
Author

Cool - just in case you dont know you can ref this issue in the relevant commit message and it will auto link :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants