1.0.0 • Published 6 years ago

egg-crypto v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

egg-crypto

crypto-js plugin for Egg.js.

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-crypto --save

Usage

// app/controller/home.js

'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    this.ctx.body = this.ctx.crypto.MD5('Hi, egg-crypto');
  }
}

module.exports = HomeController;

List

  • md5
  • basha1
  • basha256
  • basha224
  • basha512
  • basha384
  • basha3
  • ripemd160

  • hmac-md5
  • hmac-sha1
  • hmac-sha256
  • hmac-sha224
  • hmac-sha512
  • hmac-sha384
  • hmac-sha3
  • hmac-ripemd160

  • pbkdf2

  • aes
  • tripledes
  • rc4
  • rabbit
  • rabbit-legacy
  • evpkdf

  • format-openssl
  • format-hex

  • enc-latin1
  • enc-utf8
  • enc-hex
  • enc-utf16
  • enc-base64

  • mode-cfb
  • mode-ctr
  • mode-ctr-gladman
  • mode-ofb
  • mode-ecb

  • pad-pkcs7
  • pad-ansix923
  • pad-iso10126
  • pad-iso97971
  • pad-zeropadding
  • pad-nopadding

Questions & Suggestions

Please open an issue here.

License

MIT