# XOR-Crypt
[](https://travis-ci.org/RobLoach/xor-crypt)
[](https://npmjs.org/package/xor-crypt "View this project on NPM")
[](https://npmjs.org/package/xor-crypt "View this project on NPM")
[](https://david-dm.org/RobLoach/xor-crypt)
[](https://david-dm.org/RobLoach/xor-crypt#info=devDependencies)
Simple XOR string encryption library.
## Install
### [NPM](http://npmjs.org/)
- Use: `require('xor-crypt')`
- Install: `npm install --save xor-crypt`
### [Browserify](http://browserify.org/)
- Use: `require('xor-crypt')`
- Install: `npm install --save xor-crypt`
- CDN URL: `//wzrd.in/bundle/[email protected]`
### [Ender](http://ender.jit.su/)
- Use: `require('xor-crypt')`
- Install: `ender add xor-crypt`
### [Component](http://github.com/component/component)
- Use: `require('xor-crypt')`
- Install: `component install RobLoach/xor-crypt`
### [Bower](http://bower.io/)
- Use: `require('xor-crypt')`
- Install: `bower install xor-crypt`
## Usage
See the [XOR-Crypt demonstration](http://robloach.github.io/xor-crypt/) for a
live usage of XOR-Crypt.
``` javascript
var encrypted = xorCrypt('Hello World');
// Outputs: Ncjji&Qitjb
var decrypted = xorCrypt(encrypted);
// Outputs: Hello World
// Use your own XOR Key.
var encrypted = xorCrypt('Hello World', 9);
var decrypted = xorCrypt(encrypted, 9);
```
## Development
Install dependencies through [npm](http://npmjs.org):
npm install
Test with [ESLint](http://eslint.org), [Mocha](http://mochajs.org) and [Mocha
JSDom](https://github.com/rstacruz/mocha-jsdom):
npm test
Build `xor-crypt.min.js` with:
npm run build
Tag and publish the new versions to [npm](http://npmjs.com) with [Semantic
Versioning](http://semver.org/):
git tag 2.0.0
git push origin 2.0.0
npm publish
## History
[Discover the change history by heading on over to the `HISTORY.md` file.](https://github.com/RobLoach/xor-crypt/blob/master/HISTORY.md#files)
## License
Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT license](http://opensource.org/licenses/MIT)

e起学美术
- 粉丝: 31
最新资源
- 基于PLC的电机调速控制系统-广州大学.docx
- 香港地铁工程项目管理模式和经验.pptx
- 项目七网络营销专员.pptx
- 软考系统集成项目管理工程师上午试题答案.doc
- 网络安全培训(安全意识).pptx
- 网络营销实务之整理调研资料.pptx
- 微软应用软件架构设计指南.pptx
- 基于单片机的多点温度采集与记录系统.doc
- 综合布线系统施工.ppt
- 配电网自动化技术课程设计样本.doc
- 数值分析上机(C++版).doc
- 内蒙发电厂自动化控制系统图.doc
- 项目一电动机起停的PLC控制.docx
- 软件工程导论最全复习总结.doc
- 项目管理人员责任制考核办法.doc
- 基于JAVA局域网聊天程序设计与实现附源代码.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



评论0