问题
I am integrating standard java cryptography classes in my Android application, but I noticed that the AES algorithm is not that fast, it cannot encrypt more than about 5 Kb per second, so do someone know if I can get more performance if I implement my own cryptography methods using NDK? or it is just being done already in the standard library? any suggestions is appreciated
回答1:
Is Java Cryptography standard libraries in Android run as native code
On older devices, javax.crypto
is implemented in Java code. Starting in Android 4.3 or 4.4, Android uses an OpenSSL-based javax.crypto
provider, so most of the code will be native.
so do someone know if I can get more performance if I implement my own cryptography methods using NDK?
If by "implement my own cryptography methods", you mean "link to and use libcrypto
", that may be faster on older devices, but I would not expect much difference on newer devices.
来源:https://stackoverflow.com/questions/37410357/is-java-cryptography-standard-libraries-in-android-run-as-native-code