Skip to content

Optimized MutualMobile keystore library that allows you to encrypt sensitive information, generates RSA and AES keys for encryption operations. Docs at https://github.com/byolabisi/MMkeystore.gi...

License

Notifications You must be signed in to change notification settings

byolabisi/MMKeystore

Repository files navigation

AndroidKeyStore

Build Status Version

Deprecated

This Library is now Deprecated and wont be updated anymore. Use Android Native Keystore System instead.

AndroidKeyStore is a library for Android apps that allows you to encrypt sensitive information, The encryption uses the Android KeyStore available to generate and uses RSA and AES keys for encryption operations.

Getting Started

Adding androidkeystore to your project

Include the following dependencies in your app's build.gradle :

dependencies {
    implementation 'com.mutualmobile:androidkeystore:0.0.4'
}

How to use

  1. Get an instance of KeystoreCryptoFactory
val factory = KeystoreCryptoFactory.get(context)
  1. Now carry out the encryption/decryption

NOTE: Since the Encryption/Decryption is Async, the following tasks needs to be done on a background thread

  //Generate Key Aliases
  factory.create_key_if_not_available(EMAIL)
  factory.create_key_if_not_available(PASSWORD)

  //Encrypt the string
  val encryptedEmail = factory.encrypt(EMAIL, mEmail)
  val encryptedPassword = factory.encrypt(PASSWORD, mPassword)

  //Decrypt the string
  factory.decrypt(EMAIL, encryptedEmail)
  factory.decrypt(PASSWORD, encryptedPassword)

Special Thanks

Realm - The popular mobile database that runs directly inside phones, tablets or wearables. This library is cloned from (https://github.com/realm/realm-android-user-store)

License

Copyright 2018 Mutual Mobile

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.

About

Optimized MutualMobile keystore library that allows you to encrypt sensitive information, generates RSA and AES keys for encryption operations. Docs at https://github.com/byolabisi/MMkeystore.gi...

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published