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

Does not work on JS/Web platform? #1

Open
hpoul opened this issue Aug 6, 2021 · 2 comments
Open

Does not work on JS/Web platform? #1

hpoul opened this issue Aug 6, 2021 · 2 comments

Comments

@hpoul
Copy link

hpoul commented Aug 6, 2021

When I understand the README.md correctly, this package be working when compiled to javascript and used on the web?

for all Dart platforms (JS/Web, Flutter, VM/Native).

but when trying to run the tests on chrome:

➜  argon2 git:(master) pub run test -p chrome 
Precompiling executable... (10.4s)
Precompiled test:test.
00:02 +0: compiling test/argon2_test.dart                                                                                                                                              
lib/src/argon2_base.dart:61:27:
Error: The integer literal 0xFFFFFFFFFFFFFFFF can't be represented exactly in JavaScript.
  static const int M32L = 0xFFFFFFFFFFFFFFFF;
                          ^^^^^^^^^^^^^^^^^^
lib/src/argon2_extension.dart:73:15:
Error: The integer literal 0xFFFFFFFFFFFFFFFF can't be represented exactly in JavaScript.
            ((0xFFFFFFFFFFFFFFFF) ^ ((1 << (64 - count)) - 1));
              ^^^^^^^^^^^^^^^^^^
Error: Compilation failed.
@BitPampers
Copy link

Same here. Any activity in this repository to maybe fix this?
Or at least remove the web compatibility misleading mention from the description and pub.dev

@gmpassos
Copy link
Owner

This implementation of Argon2 was incorporated into Pointycastle:

https://pub.dev/packages/pointycastle

In the last version they have implemented support for JS/Web/Browser computation.

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

3 participants