New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-crypton

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-crypton

implement native encryption for react native,simple and easy to use

latest
npmnpm
Version
1.0.6
Version published
Maintainers
1
Created
Source

Crypton

react-native-crypton

An encryption pakage for react native based on native implemention

Getting started

$ npm install react-native-crypton --save

automatic installation

$ react-native link react-native-crypton

Manual installation

iOS

  • In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  • Go to node_modulesreact-native-crypton and add RNCrypton.xcodeproj
  • In XCode, in the project navigator, select your project. Add libRNCrypton.a to your project's Build PhasesLink Binary With Libraries
  • Run your project (Cmd+R)<

Android

  • Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNCryptonPackage; to the imports at the top of the file
  • Add new RNCryptonPackage() to the list returned by the getPackages() method
  • Append the following lines to android/settings.gradle:
    include ':react-native-crypton'
    project(':react-native-crypton').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-crypton/android')
    
  • Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-crypton')
    

Added encyption methodes

  • AES-256-CBC Encryption & Decryption with PBKDF2

Usage

import { Pbkdf2 } from 'react-native-crypton';

//encrypt
//text 		= String we want to decrypt in base-64
//password		= String password
Pbkdf2.encrypt("<text>", "<password>")
      .then(r => console.log('encrypted:: ', r))
      .catch(e => console.log('enc catched: ', e));

//decrypt
 Pbkdf2.decrypt("<encrypted_text>", "<password>")
      .then(r => console.log('decrypted:: ', r))
      .catch(e => console.log('dec catched: ', e));


Tasks:

  • ios pbkdf2

Contact

Linkedin

E-mail: amirhosein5858@gmail.com Backup e-mail: amir@rednode.ir

Thanks to

CryptoSwift

Keywords

react-native

FAQs

Package last updated on 10 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts