rn-rncryptor
v1.0.12
Published
React Native RNCryptor
Downloads
9
Readme
Forked from react-native-rncryptor-aes-256
React Native RNCryptor
It's an easy-to-use library for encrypting data with AES 256 in React Native. RNCryptor developed popular and easy-to-use AES libs, implementations are available in C++, C#, Java, PHP, Python, Javascript, and Ruby.
Usage
import RNCryptor from 'react-native-rncryptor';
RNCryptor.encrypt('a text', 'password').then((encryptedbase64)=>{
console.log(encryptedbase64)
}).catch((error)=>{
console.log(error)
})
RNCryptor.encryptFromBase64('a base64 string', 'password').then((encryptedbase64)=>{
console.log(encryptedbase64)
}).catch((error)=>{
console.log(error)
})
RNCryptor.decrypt('encrypted base64', 'password').then((plaintext)=>{
console.log(plaintext)
}).catch((error)=>{
console.log(error)
})
RNCryptor.decryptToBase64('encrypted base64', 'password').then((plaintextBase64)=>{
console.log(plaintextBase64)
}).catch((error)=>{
console.log(error)
})
License
MIT