egg-crypto
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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
  • sha1
  • sha256
  • sha224
  • sha512
  • sha384
  • sha3
  • 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

Package Sidebar

Install

npm i egg-crypto

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

7.95 kB

Total Files

7

Last publish

Collaborators

  • xjh22222228