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

IE 11 syntax error Expected ';' #7

Open
nolimitdev opened this issue Sep 4, 2020 · 3 comments
Open

IE 11 syntax error Expected ';' #7

nolimitdev opened this issue Sep 4, 2020 · 3 comments

Comments

@nolimitdev
Copy link

nolimitdev commented Sep 4, 2020

Hi, im building app.js with webpack and in IE 11 I got error Expected ';' for this line state[x][y] = 0n; of sha3.js. I tried to include @babel/plugin-syntax-bigint but it still does not work. Could you please advise how to fix it?

@chrisveness
Copy link
Owner

I have very little experience of using Babel – I take it you are following the usage from babeljs.io/docs/en/babel-plugin-syntax-bigint?

I suggest you either raise it with the author of plugin-syntax-bigint, or else commit 8ee96a uses a Long class to emulate an unsigned 64-bit integer, which may work in IE.

Note that this code is a reference implementation intended primarily for study purposes rather than for production use: it has a good test suite, but I can provide no guarantees of cryptographic security.

@nolimitdev
Copy link
Author

There are many use cases that we do not need complex well known lib. In my case I just want to use your lib to get fingerprint of some JSON stringified data using sha3-256 and fingerprint will be used as cache key - so no important critical feature. Your lib minified means +3kB to final bundle and for example this lib https://www.npmjs.com/package/js-sha3 minified +10kB. Im sure I have implemented @babel/plugin-syntax-bigint correctly. I have tried to use it via file .babelrc or webpack.config.js too but it still does not work. I do not know why.

@nolimitdev
Copy link
Author

UPDATE: yes, commit https://github.com/chrisveness/crypto/blob/8ee96a/sha3.js works well in IE 11

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

No branches or pull requests

2 participants