Reputation: 540
<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
But why hash is undefined?
Upvotes: 0
Views: 4433
Reputation: 175896
The message must be passed as a string;
var hash = CryptoJS.HmacSHA512("1111111", stub11111);
(Assuming stub11111 is a variable, otherwise quote it)
Upvotes: 1