GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rajeshbdabhi/SecureSharedPreferences: SecureSharedPreferences is very fast encrypt and decrypt data. and use like normal SharedPreferences

BranchesTags
Open more actions menu

Latest commit

 

History

15 Commits
15 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
app
app
 
 
gradle/wrapper
gradle/wrapper
 
 
securesharedpreferences2
securesharedpreferences2
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

SecureSharedPreferences

SecureSharedPreferences

This library provice to save and get data same as SharedPreferences with perform AES encryption.

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

Add it in your app level build.gradle

dependencies {
		implementation 'com.github.rajeshbdabhi:SecureSharedPreferences:latest-version'
}

Usage:

SecureSharedPreferences use like normal SharedPreferences

//initialise
val secureSharedPreferences = SecureSharedPreferences(this, "pref_name", "password")	
    
// shared preference editor
val editor = secureSharedPreferences.edit()
    
// put string
editor.putString("key", "value")

//get string
val key = secureSharedPreferences.getString("key", "this default value")

Version 1.0.1

Secure old SharedPreference:

val oldPref = getSharedPreferences("old_name", 0)
    SecureOldSharedPreferences(
        this,
        oldPref,
        "old_name",
        "1234",
        object : SecureOldSharedPreferences.EncryptListener {
            override fun encrypted() {
                // encryption done
            }
        }).execute()
    
// featch new SecureSharedPreferences with old name and new password like this.
val newsecureSharedPreferences = SecureSharedPreferences(this@MainActivity, "old_name", "1234")

Encrypt and Decrypt other strings:

// for simple encrypt and decrypt any string data
val encoded = SecureSharedPreferences.encrypt("test", "title")
val decod = SecureSharedPreferences.decrypt("test", encoded)

About

SecureSharedPreferences is very fast encrypt and decrypt data. and use like normal SharedPreferences

Topics

aes-cipheraes-encryptionandroidkotlinsecure-storagesecurepreferencessecuresharedpreferencessharedpreferences

Resources

Readme
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.