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

SharedPreferences fileName argument injection #29

Closed
AfanasievAnton opened this issue Nov 15, 2021 · 4 comments
Closed

SharedPreferences fileName argument injection #29

AfanasievAnton opened this issue Nov 15, 2021 · 4 comments

Comments

@AfanasievAnton
Copy link

Hi looking on Android implementation of KVault it looks like its API does not allow custom sharedPreferences name.

 encSharedPrefs = EncryptedSharedPreferences.create(
            context,
            "secure-shared-preferences", 
            masterKey,
            EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV,
            EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM
        )

The "secure-shared-preferences" is hardcoded. Is it possible to add a second argument to KVault constructor with default value, so that at least there will be an option to give a unique fileName.

@gaebel
Copy link
Contributor

gaebel commented Nov 16, 2021

Hi @AfanasievAnton, yes we can add this. Could you create a PR with this change?

@AfanasievAnton
Copy link
Author

Thanks @gaebel , unfortunately I keep getting permission denied when trying to upload a side branch with this chages.

@gaebel
Copy link
Contributor

gaebel commented Nov 23, 2021

You can't push directly into the repository. You have to create a fork and then a PR with the changes in the forked repo.

@gaebel
Copy link
Contributor

gaebel commented Feb 17, 2022

I've implemented the feature in the latest release.

@gaebel gaebel closed this as completed Feb 17, 2022
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