# react-crypt-gsm

> A simple wrapper to handle encryption of strings and decryption of string which can be used in react application. react-crypt-gsm is a simple aes-256-gcm encrypt and decrypt module for node.js

Latest version **1.0.4** (published 2019-11-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-crypt-gsm
pnpm add react-crypt-gsm
yarn add react-crypt-gsm
bun add react-crypt-gsm
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2019-11-15 |
| First published | 2019-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Ankit Kanojia |
| Maintainers | ankitkanojia |
| Keywords | encrypt, encryption, decryption, decrypt, react, AES256-GCM |

## Links

- npm: https://www.npmjs.com/package/react-crypt-gsm
- Repository: https://github.com/ankitkanojia/react-crypt-gsm
- Homepage: https://github.com/ankitkanojia/react-crypt-gsm#readme
- Issues: https://github.com/ankitkanojia/react-crypt-gsm/issues
- npm.io page: https://npm.io/package/react-crypt-gsm

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2019-11-15

## README

# react-crypt-gsm
A simple wrapper to handle encryption of strings and decryption of string which can be used in react application. react-crypt-gsm is a simple aes-256-gcm encrypt and decrypt module for node.js

  - `aes-256-gcm` encryption algorithm

## Getting Started
Install the module with: `npm install --save react-crypt-gsm` or `yarn add react-crypt-gsm`

## Usage with Node Application
Using the module is pretty simple.  Create an instance of the react-crypt-gsm. You can use both **encrypt** and **decrypt** keyword or instance which can perform encryption and decryption.

```
const reactCryptGsm = require("./../lib/index.js")   //For Node application

// String on which you want to perform encryption functionality
const sampleString = 'sample text';

// Encrypt it
const encryptedText = reactCryptGsm.encrypt("sample text");

// Decrypt it
const decryptedText = reactCryptGsm.decrypt(encryptedText);
```

## Usage with React Application
Using the module is pretty simple.  Create an instance of the react-crypt-gsm. You can use both **encrypt** and **decrypt** keyword or instance which can perform encryption and decryption.

```
import React, { Component } from 'react';
import  { encrypt , decrypt } from 'react-crypt-gsm';

// String on which you want to perform encryption functionality
cimport React, { Component } from 'react';
import  { encrypt , decrypt } from 'react-crypt-gsm';
const sampleString = 'sample text';

class App extends Component {
  constructor(props)
  {
      super(props);
      this.state = {
        encryptedString : ""
      }
  }

  componentDidMount() {
    const encryptedStr = encrypt(sampleString);
    this.setState({
      encryptedString : encryptedStr
    });
  }

  render() {
    return (
      <div className="App">
          <p>Encrypted String : {this.state.encryptedString} </p>
          <p>Decrypted String : {decrypt(this.state.encryptedString)} </p>
      </div>
    );
  }
}

export default App;
```

## License
Copyright (c) 2019 Ankit Kanojia
Licensed under the MIT license.

---
_Source: https://npm.io/package/react-crypt-gsm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
