@chunpu/xor

XOR Encrypt and Decrypt, Support utf-8

Usage no npm install needed!

<script type="module">
  import chunpuXor from 'https://cdn.skypack.dev/@chunpu/xor';
</script>

README

@chunpu/xor

NPM version Downloads Dependency Status

XOR Encrypt and Decrypt, Support utf-8

Installation

npm i @chunpu/xor

Usage

const xor = require('@chunpu/xor')

Support Both Browsers and Node.js

Api

  • xor.encrypt(value, secret)
  • xor.decrypt(str, secret)

Example

var secret = 'secret'
var value = '1024'

console.log(xor.encrypt(value, secret))
// => 'QlVRRg=='

License

License