@shenyan1206/crypto-helper

1.0.3 • Public • Published

crypto-helper

Crypto Helper for NodeJS

Support: TDES, DES with mode ECB and CBC

Padding: PADDING_ZERO, PADDING_PKCS7

Public Methods:

tdes_enc_ecb(key, data)

tdes_dec_ecb(key, data)

tdes_enc_cbc(key, data, iv)

tdes_dec_cbc(key, data, iv)

des_enc_ecb(key, data)

des_dec_ecb(key, data)

padding(data, padding_type)

unpadding(data, padding_type)

kcv(key)

generateKeyOfSize(size)

installation

$ npm install @shenyan1206/crypto-helper --save

example

var CryptoHelper = require("@shenyan1206/crypto-helper");

var key = Buffer.from("0123456789ABCDEFFEDCBA9876543210", "hex");
var data = Buffer.from("0102030405060708", "hex");

var ciphter_data = CryptoHelper.tdes_enc_ecb(key, data);

console.log(ciphter_data);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    3
  • 1.0.2
    24
  • 1.0.1
    2
  • 1.0.0
    2

Package Sidebar

Install

npm i @shenyan1206/crypto-helper

Weekly Downloads

7

Version

1.0.3

License

ISC

Unpacked Size

5.13 kB

Total Files

3

Last publish

Collaborators

  • shenyan1206