@elonehoo/cryptomagic
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

cryptomagic

NPM version

Install

npm install @elonehoo/cryptomagic

Usage

import JsonEncryptDecrypt from '@elonehoo/cryptomagic'
const aes = new JsonEncryptDecrypt('pass')

// Encrypt an json object
const encryptMessage = aes.encrypt({ password: '67256558250eda49' })

// Decrypt an encrypted message
const decryptMessage = aes.decrypt(encryptMessage)

console.log('encryptMessage:', encryptMessage)
// encryptMessage: 8vp5dLgHjqaeU0/+xns2dP0lt+n4kCuEpTL8pRxC9CPAX+EflctafaiFqUZqgKOLD+Y2/hZkCjwjctMfELWkzzGS18BiHOGiF+w0RU/JZV6SQNRb5V6ziOjySUWkE2MCfLQuEPMd/9HkSYjftmXoZIVJpAxScvv5YbKDUXDqGCOagg0aHXJbfP8DOTsvjS3K2bYXY93MCKoPV+9ZhyQe7lzSCpSm3YJXm6/875gW5eE=

console.log('decryptMessage:', decryptMessage)
// decryptMessage: { password: '67256558250eda49' }

Readme

Keywords

Package Sidebar

Install

npm i @elonehoo/cryptomagic

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

8.04 kB

Total Files

8

Last publish

Collaborators

  • elonehoo