0.0.5 • Published 7 years ago

react-native-safe-storage v0.0.5

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
7 years ago

Usage

This module can be used to store and encrypt Strings as "key, value"-pairs to platform specific storages.

- import SafeStore module: 
	import safeStorage from 'react-native-safe-storage/SafeStorage';

- encrypt:
	SafeStorage.setEntry(key, value);

- decrypt:
	SafeStorage.getEntry(key, defaultValue, callback);

	e.g.
	safeStorage.getEntry("someKey", "default value", (s) => {alert(s);});

- Asynchronous decrypt:
	await SafeStorage.getEntryAsync(key, defaultValue);

	e.g.
	await safeStorage.getEntryAsync("someKey", "default value");

- decrypt method returns the default value if the key specified is not found

Android

In android keys are encrypted with RSA/ECB/PKCS1Padding keypair and stored to shared preferences.

iOS:

In iOS data is stored to the iOS keychain.
0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago