This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0
wcui/js/lib/md5/Readme.md

28 lines
560 B
Markdown

# md5 加密组件
可对普通字符串和文件计算其对应的md5值。
组件符合AMD规范, 可使用require引入
### demo:
```javascript
require(['./md5'], function(SparkMD5){
var Spark = new SparkMD5()
var md5 = function(cont){
return Spark.sign.call(Spark, cont)
}
var file = /*...*/ //文件表单获取
var fs = new FileReader() // Chrome, IE9+, FF, Safari
fs.readAsBinaryString(file)
fs.onload = function(){ // 计算该文件的md5签名
var sign = md5(this.result)
}
})
```
wcui是一套基于`Web Components`的UI组件库, 宗旨是追求简单、实用、不花哨。
JavaScript 95.2%
CSS 4.8%