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

react-native-aes-pack

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-aes-pack

AES-CBC-PKCS5Padding

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

react-native-aes-pack

AES-CBC-PKCS5Padding

npm i --S react-native-aes-pack

For iOS run pod install

Install for version <0.6

npm i --S react-native-aes-pack

react native link react-native-aes-pack

methods

  • encrypt
NameTypeNote
sourceTextstringplaintxt
secretKeystringsecret key,max 16 bytes
ivstringinitialization vector,max 16 bytes
  • decrypt
NameTypeNote
sourceTextstringcipher txt
secretKeystringsecret key,max 16 bytes
ivstringinitialization vector,max 16 bytes

Usage

import AesCrypto from 'react-native-aes-pack';

const plaintxt = 'test';
const secretKey = '0102030405060708';
const iv = '1112131415161718';

AesCrypto.encrypt(plaintxt,secretKey,iv).then(cipher=>{
    console.log(cipher);// return a string type cipher
    this.setState({ cipher });
}).catch(err=>{
    console.log(err);
});

AesCrypto.decrypt(this.state.cipher,secretKey,iv).then(plaintxt=>{
    console.log(plaintxt);// return a string type plaintxt
}).catch(err=>{
    console.log(err);
});

Keywords

AES

FAQs

Package last updated on 24 Oct 2019

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