0.0.8 • Published 6 months ago

react-native-key-manager v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

react-native-key-mamager

A package for securely generating and mananging keys in React-Native.

Installation

npm install react-native-key-manager --save

cd ios && pod install && cd ..

or

yarn add react-native-key-manager

cd ios && pod install && cd ..

Usage

import {
  CreateOrGetKey,
  GenerateKey,
  GetKey,
  DeleteKey,
  UpdateKey,
  SetKey,
} from 'react-native-key-manager';

// ...

const result = await GenerateKey();

API

  1. SetKey(alias: string, key: string) - Save the key. Returns: Promise that resolves with object {success: true, message: response_text} if success or rejects with message if fail.

  2. UpdateUser(alias: string, key: string) - Update the key. Returns: Promise that resolves with object {success: true, message: response_text} if success or rejects with message if fail.

  3. GetKey(alias: string) - Gets the key. Returns: Promise that resolves with object {success: true, alias: "alias", key: "key"} if success or rejects with message if fail.

  4. DeleteUser(alias: string) - Deletes the alias. Returns: Promise that resolves with object {success: true, message: response_text} if success or rejects with message if fail.

  5. CreateOrGetKey(alias: string, length: number (Optional), characterSet: string (Optional)) - Creates or Rertives a Key. Returns: Promise that resolves with object {success: true, alias: "alias", key: "key"} if success or rejects with message if fail.

  6. GenerateKey(length: number (Optional), characterSet: string (Optional)) - Creates a Key. Returns: String of a random key of desired length.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

0.0.8

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.5

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.1

6 months ago

0.0.2

6 months ago