Giter Site home page Giter Site logo

cryptojs_md5's Introduction

cryptojs_md5

用于网页端获取 MD5 摘要。

部分内容来自 https://github.com/brix/crypto-js
webCrypto 不支持 MD5 ,所以必须使用 CryptoJS 。
比直接加载整个 CryptoJS 的体积更小,仅 7.84 KB 。


使用

dist/cryptojs_md5.js 的js文件放到你的网站的根目录,然后使用以下方式加载它。

必须在调用前加载成功!别怪我没提醒。

<script src="/cryptojs_md5.js"></script>

然后在JS中使用以下方式调用,以同步返回小写的字符串。

cryptojs_md5('要被加密的内容,此处也可以填写 ArrayBuffer 类型').toString()
// '8311060a4a3f58068fdc153c784afe28'

生成js文件(编译)

预先安装nodejs,然后运行这个命令以全局安装webpack。(已安装的请跳过这步)

npm -g install webpack

然后在当前文件夹运行webpack以生成 dist/cryptojs_md5.js

webpack

cryptojs_md5's People

Contributors

bddjr 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.