@shenyan1206/crypto-helper

    1.0.2 • 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

    $ nmp 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);

    Install

    npm i @shenyan1206/crypto-helper

    DownloadsWeekly Downloads

    0

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    5.14 kB

    Total Files

    3

    Last publish

    Collaborators

    • shenyan1206