jos3k4 / crypto-js

Automatically exported from code.google.com/p/crypto-js
0 stars 0 forks source link

Base64 encoding of hash identical to hex encoding #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I used the hmac-sha256.js rollup
2. generated a hash using CryptoJS.HmacSHA256
3. I used hash.toString(<enc>) to convert to various output formats and saw 
that base64 is the same as hex

What is the expected output? What do you see instead?
signature(b64): e6393a027f16e62a63f709e85c882d1ec2864b96ed659600dc4f65b23e1f0d5c
signature(latin): æ9:æ*c÷ è\ˆ-†K–íe–�ÜOe²>
\
signature(hex): e6393a027f16e62a63f709e85c882d1ec2864b96ed659600dc4f65b23e1f0d5c

What version of the product are you using? On what operating system?
I'm running in FF23 on OS X

Please provide any additional information below.

Original issue reported on code.google.com by david.ka...@eucalyptus.com on 25 Aug 2013 at 3:26

GoogleCodeExporter commented 9 years ago
Most likely it's because the enc-base64.js script wasn't loaded, which means 
CryptoJS.enc.Base64 will be undefined.

Original comment by Jeff.Mott.OR on 25 Aug 2013 at 5:13

GoogleCodeExporter commented 9 years ago
Thanks! I included enc-base64.js and it works fine.

Original comment by david.ka...@eucalyptus.com on 25 Aug 2013 at 11:40

GoogleCodeExporter commented 9 years ago

Original comment by Jeff.Mott.OR on 25 Aug 2013 at 2:38