Giter VIP home page Giter VIP logo

javascript-sm3's Introduction

JavaScript SM3

简介

国密SM3密码杂凑算法的JavaScript实现。目前只能在服务器端环境Node.js使用。

使用

直接下载源代码将sm3.js拷贝到你的项目中,或者使用npm安装:

npm install sm3
const sm3 = require('sm3');
const hash = sm3('值');

要求

没有依赖,但Node.js版本需>=6.0.0,或使用sm3-babel.js文件(Node.js版本>=1.0.0), 也可自行使用Babel对sm3.js文件进行转化(具体如何使用可参见(http://www.ruanyifeng.com/blog/2016/01/babel.html))

babel sm3.js --out-file sm3-babel.js

接口

const hash = sm3('值');

参考

SM3密码杂凑算法

License

MIT license.

javascript-sm3's People

Contributors

jiaxingzheng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.