1.6.10 • Published 5 years ago

xor-crypto-js v1.6.10

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

xor-crypto-js

A xor-crypto implements version of javascript, support nodejs & broswer.
params both support any utf8-character-string.

Install

npm i xor-crypto-js 

Example use

// In NodeJs
var xor = require('xor-crypto-js');
// In broswer
// link with script tag in html: <script type="text/javascript" src="your-path-to/xor-crypto-js/index.js" ></script> 
// then:
var xor = window.xor;
// In es6:
import xor from 'xor-crypto-js'   // now, you should have babel support first.


var plain_text = '窝爱你,sigou';  // 待加密的原文

var cipher_key = 'dd哦en'; // 用来加密的密钥key

var cipher_text = xor.encrypt(plain_text, cipher_key); //得到密文

console.log('cipher_text: ' + cipher_text); // '01etbgj77fig93ki1r6801703dq0ji3ri9h'

var plain_is = xor.decrypt(cipher_text, cipher_key);

console.log('plain_is:',plain_is); // '窝爱你,sigou'
1.6.10

5 years ago

1.6.9

5 years ago

1.6.8

5 years ago

1.6.7

5 years ago

1.6.6

5 years ago

1.6.5

5 years ago

1.6.4

5 years ago

1.6.3

5 years ago

1.6.2

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago