-
Notifications
You must be signed in to change notification settings - Fork 51
FAQ
We get it. You've tried a million other cryptography libraries and you're tired of performing mental gymnastics just to get something, anything working. We've done the work for you. We've compiled and wrapped the native libraries inside this project so you don't have to. Plus, we've designed our library in such a way that just makes it infinitely easier to work with.
For example, this:
byte[] subkey = subkey[32];
int subkeyLen = subkey.length;
long subkeyId = 1L;
byte[] context = "Examples".getBytes(StandardCharsets.UTF_8);
byte[] masterKey = "a_master_key".getBytes(StandardCharsets.UTF_8);
int result = lazySodium.cryptoKdfDeriveFromKey(subkey, subkeyLen, subkeyId, context, masterKey);
// Now check the result
if (res == 0) {
// We have a positive result. Let's store it in a database.
String subkeyString = new String(subkey, StandardCharsets.UTF_8);
}
...becomes this:
long subKeyId = 1L;
String context = "Examples";
String masterKey = "a_master_key";
String subkeyString = lazySodium.cryptoKdfDeriveFromKey(subKeyId, context, masterKey);
💯 💯
We wanted developers to have an effortless experience using cryptography. Every cryptography library we came across for Java and Android was plagued with inconsistencies and outdatedness. We thought, "Someone should do something about this...". So we did.
Even though you can code in Java on Android, it does not mean that Android conforms to Java's semantics surrounding the build and packaging phases. For example, Java packages files as a jar
and Android packages files as an aar
. This is so that you can include res
files in your Android projects. This is why we have both Lazysodium for Android and Lazysodium for Java even if the former is just a wrapper around the latter.
This function was removed in version 1.0.3
as Android complained that it was not found in libsodium.so
. It worked in Java so it was purely an Android specific error. See issue 15.
We're sorry to hear this. It goes against our ethos to make you do some work, but if you could create an issue on the issue tracker, that'd be perfect.