Skip to content

This React Native module lets you store cryptographic keys in a container to make it more difficult to extract from the device.

Notifications You must be signed in to change notification settings

pesehr/react-native-secure-KeyStore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

React Native Secure Keystore

This React Native module lets you store cryptographic keys in a container to make it more difficult to extract from the device.

Current functions:  
 - Generate Key pair and save them.
 - Get Public Key string and fingerprint. 
 - Sign data with Private key.

Features!

  • Use Android and IOS native key store system for saving keypair secure.
  • Android Minimum SDK Level = 18

Installation

first get source code.

$ git clone https://github.com/pesehr/secureKeyStore.git

now you can install module with following instruction.

  • Android

    • goto Android folder and copy all java files to your android sorce code folder of your react native project. now ajust the codes with your project.
    • copy following code line to your MainApplication.java:
      new SecureKeyStoreModulePack()
      your code have must be like this:
      public class MainApplication extends Application implements ReactApplication {
          private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
          @Override
          public boolean getUseDeveloperSupport() {
                return BuildConfig.DEBUG;
           }
          @Override
           protected List<ReactPackage> getPackages() {
              return Arrays.<ReactPackage>asList(
              new MainReactPackage(),
              new SecureKeyStoreModulePack()
                  );
              }
          };
      }
  • IOS

    install this module on ios devices is more difficult then android. please do all instructions carefully
  • NodeJS

    • you can invoke native methodes by NativeModule object. for example you could invoce generateKeys method like this:
      import { NativeModules } from 'react-native';
      NativeModules.SecureKeyStore.generateKeys();

Todos

  • Correct English writing wrongs!!!
  • Add encryption with publickey and decryption with privatekey.
  • Installation using npm.

Contributing

Please create issues and send pull requests!

License

MIT

Free Software, Hell Yeah!

About

This React Native module lets you store cryptographic keys in a container to make it more difficult to extract from the device.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published