bcgit / pc-dart

Pointy Castle - Dart Derived Bouncy Castle APIs
MIT License
237 stars 122 forks source link

argon2.dart has a number that cannot be represented in javascript #122

Closed KevinCCucumber closed 3 years ago

KevinCCucumber commented 3 years ago

Hey, I just implemented OpenID into my app and now I get this error when launching on the web:

Launching lib\main.dart on Chrome in debug mode...
lib\main.dart:1
/D:/Programmieren/SDKs/flutter/.pub-cache/hosted/pub.dartlang.org/pointycastle-3.1.3/lib/key_derivators/argon2.dart:42:27: Error: The integer literal 0xFFFFFFFFFFFFFFFF can't be represented exactly in JavaScript.
Try changing the literal to something that can be represented in Javascript. In Javascript 0x10000000000000000 is the nearest value that can be represented exactly.
  static const int M32L = 0xFFFFFFFFFFFFFFFF;
                          ^^^^^^^^^^^^^^^^^^
/D:/Programmieren/SDKs/flutter/.pub-cache/hosted/pub.dartlang.org/pointycastle-3.1.3/lib/src/utils.dart:313:9: Error: The integer literal 0xFFFFFFFFFFFFFFFF can't be represented exactly in JavaScript.
Try changing the literal to something that can be represented in Javascript. In Javascript 0x10000000000000000 is the nearest value that can be represented exactly.
      ((0xFFFFFFFFFFFFFFFF) ^ ((1 << (64 - count)) - 1));
        ^^^^^^^^^^^^^^^^^^
/D:/Programmieren/SDKs/flutter/.pub-cache/hosted/pub.dartlang.org/pointycastle-3.1.3/lib/src/platform_check/platform_check.dart:6:35: Error: Method not found: 'getPlatform'.
  static Platform get instance => getPlatform();
                                  ^^^^^^^^^^^
Failed to compile application.
Exited (sigterm)

Is there any other Information you need?

mwcw commented 3 years ago

Hi,

This was fixed and is in the last rc.

MW