jsSHA, CryptoJS and OpenSSL libraries giving different results
New to JS, I'm also learning to use crypto libraries. I don't understand why signing/encoding the same message with the same secret yields differing results. I'm using jsSHA 1.3.1 found here , and CryptoJS 3.0.2 described here trying to create a base64 sha-1 encoded hmac signature. Here's the code: In html... <script src="lib/jsSHA/src/sha1.js"></script> <script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/hmac-sha1.js"></script> And in js... var message = "shah me"; var secret = "hide me"; var crypto = CryptoJS.HmacSHA1(message, secret).toString(CryptoJS.enc.Base64) + '='