-
Notifications
You must be signed in to change notification settings - Fork 2
Native.register() not found in android application. #4
Copy link
Copy link
Open
Description
We have followed the steps to integrate library into our application.
But faced with having crash while initialising Hydrogen
Below is the code we tried with
Native.register(Hydrogen.class, "hydrogen");
Hydrogen hydrogen = new Hydrogen();
hydrogen.hydro_init();
// Make a key
byte[] key = new byte[Hydrogen.HYDRO_SIGN_SECRETKEYBYTES];
hydrogen.hydro_secretbox_keygen(key);
// Make a cipher array to hold the resulting encrypted text
byte[] cipher = new byte[Hydrogen.HYDRO_SECRETBOX_HEADERBYTES + 48];
String context = "context1";
byte[] contextBytes = context.getBytes();
String message = "This is a message that will be encrypted.";
byte[] messageBytes = message.getBytes();
long messageId = 1L;
// Now encrypt
int encryptSuccess = hydrogen.hydro_secretbox_encrypt(cipher, messageBytes, messageBytes.length, messageId, contextBytes, key);
Error:
E/zygote64: No implementation found for int co.libly.hydride.Hydrogen.hydro_init()
Can you please let me know how can we get this sorted out?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels