GithubHelp home page GithubHelp logo

miguelramosfdz / android-secure-storage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from epam/android-secure-storage

0.0 2.0 0.0 1.63 MB

Secure android storage to keep private information safe

License: Apache License 2.0

Java 100.00%

android-secure-storage's Introduction

Android-Secure-Storage

SecureStorage is used to keep private information in a safe mode without requiring a password or a fingerprint.
There are two types of encryption providers: CIPHER and THEMIS. Which provide different level of encryption. THEMIS is stronger then CIPHER and should be used to keep sensitive data like passwords and etc.

KOTLIN

1. In order to initialize the SecureStorage choose one of the following encryption providers:

CIPHER encryption:

val storage = new SecureStorage(context, SecurityProvider.Type.CIPHER)  

THEMIS encryption:

val storage = new SecureStorage(context, SecurityProvider.Type.THEMIS)  

SecureStorage EVENTS:
To subscribe to SecureStorage Events, please initialize in the following way

val storage = SecureStorage(context, SecurityProvider.Type.CIPHER, object : SecureStorageCallback {  
  override fun onComplete(actionType: SecureStorageCallback.ActionType) {  
      Log.d("CIPHER_PROVIDER", actionType.toString())  
  }  
 override fun onError(actionType: SecureStorageCallback.ActionType, e: Exception) {  
      Log.d("CIPHER_PROVIDER_ERROR", actionType.toString(), e)  
  }  
})

2. Main methods to work with the SecureStorage To SAVE data:

storage.save(key, value)  

To GET data:

storage.get(key)  

To REMOVE specific data:

storage.remove(key)  

To ERASE all data:

storage.erase()  

JAVA

1. In order to initialize the SecureStorage choose one of the following encryption providers:

CIPHER encryption:

SecureStorage storage = new SecureStorage(context, SecurityProvider.Type.CIPHER);  

THEMIS encryption:

SecureStorage storage = new SecureStorage(context, SecurityProvider.Type.THEMIS);  

SecureStorage EVENTS:
To subscribe to SecureStorage Events, please initialize in the following way

SecureStorage storage = new SecureStorage(this, SecurityProvider.Type.CIPHER, new SecureStorageCallback() {  
  @Override  
public void onComplete(ActionType actionType) {  
      if(actionType == ActionType.SAVE){  
          Log.d("CIPHER_PROVIDER", actionType.toString());   
      }  
  }  

 @Override  
public void onError(ActionType actionType, Exception e) { 
   if(actionType == ActionType.SAVE){  
      Log.d("CIPHER_PROVIDER_ERROR", actionType.toString(), e); 
      } 
  }  
});

2. Main methods to work with the SecureStorage To SAVE data:

storage.save(key, value)  

To GET data:

storage.get(key)  

To REMOVE specific data:

storage.remove(key)  

To ERASE all data:

storage.erase()  

android-secure-storage's People

Contributors

denysmokhrin avatar kuragit avatar vixentael avatar vladimir-ivanov-epam avatar vvsevolodovich avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.