Comments (3)
Hi @pfumagalli, thanks! I haven't actually profiled the Java impl as the native SSE2 impl was ~4x faster (not to mention the GC pressure) last time I checked. Are you using it server-side and the native impl isn't loading? I'd definitely like to fix that if so.
from scrypt.
I just want to run it as pure Java, I don't need raw speed at this moment, so avoiding the various non-trivialities of loading the native library (I'm actually just copying and pasting your code into something I'm working on, not using it directly).
For the GC pressure, you can pre-allocate your buffers (all those new int[...]
and new byte[...]
) with ThreadLocal
s, you won't gain performance, but the GC will be a lot happier!
from scrypt.
Cloning may not work. It depends on the underlying JCE implementation. For example, we ran into this in a project that was using BouncyCastle. We had Mac.clone() and it blew up. If you want to clone the Mac for performance reasons, make sure you don't do it blindly. You will need to check if it is possible and proceed as appropriate. We ended up attempting the clone in the class constructor and used a boolean to indicate if cloning is possible. We check the boolean to decide to clone or get an instance in the code.
from scrypt.
Related Issues (20)
- Is the implementation thread-safe? HOT 6
- Native support for Windows HOT 2
- Android publishing issue with native platforms. HOT 1
- gradle version would be helpful HOT 1
- Android KITKAT and native scrypt support? HOT 2
- Split project into several implementation modules HOT 3
- SCryptUtil should accept char[] in addition to String
- Security issue: exec of world-readable jar entry in world-writable directory
- Include a proper license header in source files
- Android M and native scrypt support?
- Wrong hash on Android x64 devices HOT 5
- Thank you - Cisco Type 9 password hashes
- Way to disable plain hash to be used?
- Inconsistent SCryptUtil#check behavior when password is an empty string
- I dont know about where is path? - sys/limits.h: No such file or directory
- 64 bit native library?
- JAR library loading fails with '#'
- android libscrypt.dylib HOT 4
- Difference between native and java implementation
- Memory is not released after hashing, but only when JVM exits HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrypt.