An open API service indexing awesome lists of open source software.

https://github.com/androidwithrossyn/encrypted-sharedpreferences

Encrypted SharedPreferences uses strong encryption algorithms (AES-256) and is integrated with the Android Keystore system, which securely manages the encryption keys.
https://github.com/androidwithrossyn/encrypted-sharedpreferences

android-security android-security-encryption androidx-security androidxsecurity encrypted encrypted-sharedpreferences encryption encryption-algorithms encryption-library secure-sharedpref secure-storage security-crypto security-cryptography sharedpreferences sharedpreferences-easy sharedpreferences-editor sharedpreferences-helper sharedpreferences-manager

Last synced: 8 months ago
JSON representation

Encrypted SharedPreferences uses strong encryption algorithms (AES-256) and is integrated with the Android Keystore system, which securely manages the encryption keys.

Awesome Lists containing this project

README

          

Securing Android App with Encrypted SharedPreferences






### Generally data is saved in this way in Android devices.

```xml





en










```

### But when we use Encrypted SharedPreferences.
```xml

12a901bc682e67316d97810d5c4ed741daaeddd8877e30137e1b60d4094b04a6ff0bd27c351334ece9568e0b6a3d4b0de494c5577cd71a614e4198c02b8ce62626579ff52740fb41336fe4b012861f5b0533668d2642db6c45025f4428cf6fcd1aba151e991a4e1785dbd0848c8ded29a7540ad8a31236fd40b8c4ec9fa08b5ddf07ed49d6ffb42dbfa98c1a9a06c929f46120bcc6c563e82714e2f4134915b989ed0e75036428bcec24d37d1a4408d2a9e1c304123c0a30747970652e676f6f676c65617069732e636f6d2f676f6f676c652e63727970746f2e74696e6b2e4165735369764b6579100118d2a9e1c3042001
ARpRaxiHZmU9NmpOYhXGsKFWh0Q5gfG1YtjOZ+/ET0vY/zU4Pe4=
ARpRaxipyG/6dldVpNFeXh4JEO+NjL6JxmH24TTQVBj1xDVt4YKpEK8=
ARpRaxhaVtgbMw1OzeIB/+3Nywr2+DM4pzP8S9M3Jd0Qd3bvKtQXBN4=
128801cb3c76b722706eeed2f367d681c440c160a4cad6d6279d87eb1ae86494ac213f596c289d9b677f1aff5d6152fbf777fe5e57319363213e1ad6dea868e104cc6c3772924516f3e6026e863dcf3a29547876e83c833e6d7a711c86fec53a9445c09bfbe47fb3bf3d3b5339ef9c80da7a7198a6c9a2736e9a55f2039a455ddaf7fce792200904df97921a440898d6c5d201123c0a30747970652e676f6f676c65617069732e636f6d2f676f6f676c652e63727970746f2e74696e6b2e41657347636d4b657910011898d6c5d2012001
ARpRaxi7ULeVm2XWXKuSkU/0EzQKvdlou87SmUcBW4iaZMRvBgk=
ARpRaxg8hP0mELpEOwh0nfVD6wd1K8FEt78EjzdWESkBk+nY0hE=
ARpRaxi3ROeOi0fEMQ4i4Px+1ryY+adkx7aG5zBBWwD+9hPfv20=
ARpRaxgClZXUx9+dAt8DPN/pWap8QTWm5cGiIMwB0OHDNPZJs2gMu60=
ARpRaxgk4Eg5Ssh8jV4w8BDdKjFDZ1pD3V6P6PJRtiJMpTXckmw=
ARpRaxipnE2qdflE/X7dQYbNBtu7NxptAfmdz8+J/lBODO0kqSU=
ARpRaxghDuvQTvR+sH3qge7h9t7SZH4WITftmnA9jpZuizdDTzE=
ARpRaxgTIDlUlcqBurlhjMIBiWdYd/Iv/XafyPYAX+4FbElm+b8yEys=

```

Add the required dependencies to your build.gradle file:

```groovy
dependencies {
implementation("androidx.security:security-crypto:1.1.0-alpha06")
}
```
```kotlin
fun init(context : Context) {

val masterKeyAlias = MasterKey.Builder(context)
.setKeyScheme(MasterKey.KeyScheme.AES256_GCM)
.build()

this.preferences = EncryptedSharedPreferences.create(
context,
SHARED_PREFERENCE_FILE_NAME,
masterKeyAlias,
EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV,
EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM
)

}
```

Elevate your Android app to the next level with our state-of-the-art solutions! Contact us today and let’s create something extraordinary!




[![Instagram](https://img.shields.io/badge/Instagram-%23E4405F.svg?logo=Instagram&logoColor=white)](https://instagram.com/rohitraj.khorwal) [![LinkedIn](https://img.shields.io/badge/LinkedIn-%230077B5.svg?logo=linkedin&logoColor=white)](https://www.linkedin.com/in/rohitrajkhorwal/) [![Medium](https://img.shields.io/badge/Medium-12100E?logo=medium&logoColor=white)](https://medium.com/@rohitrajkhorwal)



---

`Note:` Please review our [Code of Conduct](./CODE_OF_CONDUCT.md) before using this project.
# Find this Repository useful? ❀️

Support it by joining stargazers for this repository. ⭐

Also, [follow me on GitHub](https://github.com/AndroidWithRossyn/) for my next creations! 🀩


All Repositories

## β˜• Fuel My Code



PayPal


UPI

Your support transforms caffeine into code! ✨





πŸš€ Faster Updates
πŸ” Better Documentation
πŸ› οΈ More Features




Why Support?

Every contribution helps me dedicate more time to creating high-quality open source Code. Your support directly translates to better software for everyone!



## License

```
Copyright:
~ Rossyn
~ Rohitraj Khorwal

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```