【发布时间】:2014-04-25 11:21:06
【问题描述】:
如何计算 Javascript 中特定文件的 md5?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js"></script>
<script>
var hash = CryptoJS.MD5("c23a340c2299871541d8a9d2e47bd7d5.wmv");
alert(hash);
</script>
</head>
<body>
</body>
</html>
这是一个示例代码,因此我们可以在其中获取 MD5 进行排序;只有我发现几个像这些例子,但我想要一个特定的文件,比如下面的链接会给一个文件的 md5: This link will calculate the md5 for a file so like this I want the Javascript to calculate the md5 for a file
【问题讨论】:
标签: javascript jquery facebook-javascript-sdk md5