qcrypto

0.1.0 • Public • Published

Qcrypto

var qc = require('Qcrypto');

API

qc.md5()

console.log(qc.md5('123')); // => '202cb962ac59075b964b07152d234b70'

qc.sha1()

console.log(qc.sha1('123')); // => '40bd001563085fc35165329ea1ff5c5ecbdbbeef'

qc.base64()

console.log(qc.base64('123')); // => 'MTIz'

qc.aes_en()

  • {string} 要加密的字符串
  • {string or Buffer} 密钥
console.log(qc.aes_en('123', '111')); // => 'cecbda0118c00a7c8b82e2f513b6f0de'

qc.aes_de()

  • {string} 要解密的字符串
  • {string or Buffer} 密钥
console.log(qc.aes_en('cecbda0118c00a7c8b82e2f513b6f0de', '111')); // => '123'

qc.des_en()

  • {string} 要加密的字符串
  • {string or Buffer} 密钥
console.log(qc.des_en('sb', '111')); // => 'fb468766c38be00d'

qc.des_de()

  • {string} 要解密的字符串
  • {string or Buffer} 密钥
console.log(qc.des_en('fb468766c38be00d', '111')); // => 'sb'

License

MIT

Package Sidebar

Install

npm i qcrypto

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • wallax