rotten-encryption2

1.0.19 • Public • Published

npm

encrypt text with one key

INSTALL

npm install rotten-encryption2 -S

USAGE

var rotten = require('rotten-encryption2')('mars')
var code = rotten.encode('mars森') // '_>5%1tm1Tp1Tt'
rotten.decode(code) // 'mars森'
// abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~!@#$%^&*()_+-=,.?|":;<>
var rotten = require('rotten-encryption2')('mars')

if use wan't to no special code you can

// abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
var rotten = require('rotten-encryption2')('mars', false)
var code = rotten.encode('mars森') // 'P0S8%Fq%JX%JF'
rotten.decode(code) // 'mars森'

if you want custom code you can pass three params, this will ignore second param

// 1234567890
var rotten = require('rotten-encryption2')('mars', false, 'abcdefghijklmnopqrstuvwxyzABCDEFG1234567890')
var code = rotten.encode('mars森') // 'E0nD%tq%eh%et'
rotten.decode(code) // 'mars森'

thanks for the repo give me idea

https://github.com/zachflower/rotten-encryption

Readme

Keywords

none

Package Sidebar

Install

npm i rotten-encryption2

Weekly Downloads

2

Version

1.0.19

License

ISC

Unpacked Size

42.5 kB

Total Files

9

Last publish

Collaborators

  • wuyuedefeng