Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crypto-JS v2.5.3 is reacting differently on Embed devices (Samsung Smart TV (sdk 2.XX)) and Desktop/Web #31

Closed
GoogleCodeExporter opened this issue Mar 4, 2016 · 5 comments

Comments

@GoogleCodeExporter
Copy link


Crypto-JS v2.5.3 is reacting differently on Embed devices (Samsung Smart TV 
(sdk 2.XX)) and Desktop/Web

Its reacting differently on Desktop browse and Samsung Smart TV app (basically 
a html that is running on TV internal browse, i am not sure about the detail of 
the browse).

secret = Crypto.HMAC(Crypto.SHA256, str, key, { asBytes: true });
result = Crypto.util.bytesToBase64(secret);
alert(result); // Different results on Desktop and embed device.


What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.

Original issue reported on code.google.com by miteshis...@gmail.com on 30 Mar 2012 at 12:25

@GoogleCodeExporter
Copy link
Author

I'll try to discover what I can, but it's hard to test without a smart TV 
available.

Original comment by Jeff.Mott.OR on 30 Mar 2012 at 1:05

@GoogleCodeExporter
Copy link
Author

Okey, it seems to be working fine if I remove the check

if(typeof btoa=="function")
        return btoa(g.bytesToString(b));

from bytesToBase64() in crypto-sha256-hmac.js.

Original comment by miteshis...@gmail.com on 30 Mar 2012 at 1:17

@GoogleCodeExporter
Copy link
Author

I assume, it's a check if you have this uility/function available in the 
browser you used it directly.
However, this check make your inscription browser dependent...

Original comment by miteshis...@gmail.com on 31 Mar 2012 at 7:40

@GoogleCodeExporter
Copy link
Author

Indeed. I'll remove the check and use of btoa.

Original comment by Jeff.Mott.OR on 31 Mar 2012 at 7:52

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

As I said earlier, I don't have a smart TV for testing, but I removed the use 
of "btoa" in r497 and released in v2.5.4. Presumably this will resolve the 
issue.

Original comment by Jeff.Mott.OR on 30 May 2012 at 2:14

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant