<script type="text/javascript" src="../js/lib/hmac-sha512.js"></script>
var hash = CryptoJS.HmacSHA512('1111111', 'stub11111');
CryptoJS v3.1.2
code.google.com/p/crypto-js
但为什么哈希未定义?
答案 0 :(得分:0)
消息必须以字符串形式传递;
var hash = CryptoJS.HmacSHA512("1111111", stub11111);
(假设stub11111是变量,否则引用它)