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

[java/jvm] use java.security.MessageDigest for more haxe.crypto.classes #9298

Closed
nadako opened this issue Apr 9, 2020 · 6 comments
Closed
Assignees
Labels
enhancement platform-java Everything related to Java platform-jvm Everything related to JVM

Comments

@nadako
Copy link
Member

nadako commented Apr 9, 2020

Similarly to 1cd7785 it should be done for at least Sha1 and Sha256, because it is a lot faster than the Haxe implementation.

Also we might want to profile what exactly makes Haxe implementation so slow, because improving it will benefit all the targets that don't use native functions.

@nadako nadako added enhancement platform-java Everything related to Java platform-jvm Everything related to JVM labels Apr 9, 2020
@nadako nadako added this to the Backlog milestone Apr 9, 2020
@nadako nadako self-assigned this Apr 9, 2020
@Simn
Copy link
Member

Simn commented Apr 9, 2020

It uses Array<Int>, which means boxing.

@nadako
Copy link
Member Author

nadako commented Apr 9, 2020

Hm, I wonder if haxe.ds.Vector<Int> is better. It should be, but I vaguely remember it was actually slower than Array on... JS?

@Gama11
Copy link
Member

Gama11 commented Apr 9, 2020

A Vector is a storage of fixed size. It can be faster than Array on some targets, and is never slower.

Hm... :D

@Simn
Copy link
Member

Simn commented Apr 9, 2020

#8040

nadako added a commit that referenced this issue Apr 10, 2020
there's a little bit of copy-paste going on here but oh well
@nadako
Copy link
Member Author

nadako commented Apr 10, 2020

Gotta check if all the runtimes support SHA-224, because apparently the official spec only requires MD5, SHA-1 and SHA-256.

@nadako
Copy link
Member Author

nadako commented May 25, 2020

Oh well

@nadako nadako closed this as completed May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement platform-java Everything related to Java platform-jvm Everything related to JVM
Projects
None yet
Development

No branches or pull requests

3 participants