twystd / tweetnacl-android Goto Github PK
View Code? Open in Web Editor NEWTweetNaCl crypto library port to Android
License: Other
TweetNaCl crypto library port to Android
License: Other
After importing the project into my project and adding it as a Library and getting it to build, I am now getting an UnsatisfiedLinkError: no tweetnacl in java.library.path. I think I brought the jni/ndk stuff in correctly, but for some reason the library is still not loading. Thanks
Hi,
I am using your library in a project where I need to sign stuff and verify signatures. Sometimes it works correctly, but a lot of the time the app crashes because of a heap corruption.
D/libc-fault-recovery-native: M=0xb6fbc0f4 B=0xb6fbc174 F=0x0 P=0xb9aca908 I=11
D/libc-fault-recovery-native: FIND target F=0xb9c6c330
D/libc-fault-recovery-native: M=0xb6fbc0f4 B=0xb6fbc134 F=0x0 P=0xb9d29f90 I=3
D/libc-fault-recovery-native: FIND target F=0xb9b56750
I/Choreographer: Skipped 201 frames! The application may be doing too much work on its main thread.
E/Typeface: SANS_LOC file not found.
W/IInputConnectionWrapper: reportFullscreenMode on inactive InputConnection
E/Typeface: SANS_LOC file not found.
D/libc-fault-recovery-native: M=0xb6fbc0f4 B=0xb6fbc1c4 F=0x0 P=0xb9cd6f58 I=21
D/libc-fault-recovery-native: FIND target F=0x0
A/libc: heap corruption detected by dlmalloc_real
A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 9318
W/libc: Security Level: (1), Debug inforamtion is controlled by the DUMPABLE flag.
Application terminated.
These are the last few messages in the console. Any idea how to solve this?
I have coped the code from native-lib , the TweetNacl code and the exceptions as well. The gradle syncs well. Now If I try to call the functions in another activity, I get this error
try {
KeyPair keyPair = TweetNaCl.cryptoBoxKeyPair();
byte[] val =keyPair.publicKey;
LogD(bytesToHex(val));
} catch (KeyPairException e) {
e.printStackTrace();
}
First issue is that to use cryptoBoxKeyPair(), the function in the TweetNacl.java file had to be made static
. Now If I run this I get an error that points to this line and throws the exception java.lang.UnsatisfiedLinkError
.
/**
* Loads the TweetNaCl JNI library.
*
*/
static {
System.loadLibrary("tweetnacl");
}
If I comment out this line this error comes
java.lang.UnsatisfiedLinkError: No implementation found for int com.example.varun.vesica.encryption.TweetNaCl.jniCryptoBoxKeyPair(byte[]
In Usage section of the ReadMe.md I am following this line Alternatively, copy the libs and src directories to your own project.
but not able to do it.
Could someone tell me how to tackle these errors. Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.