• This repository has been archived on 23/Feb/2021
  • Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language
    C++
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Android JNI model implementation of Rob Napier's RNCryptor.

Deprecated

Android Arsenal

RNCryptorNative

Android JNI model implementation of Rob Napier's RNCryptor.

Import guide

dependencies {
    compile 'com.github.tgio:rncryptor-native:0.0.9'
}

Usage

RNCryptorNative rncryptor = new RNCryptorNative();

String encrypted = new String(rncryptor.encrypt(raw, password));

String decrypted = rncryptor.decrypt(encrypted, password)

or

String password = "StrongGeneratedPasswordxD";

RNCryptorNative.encryptAsync("test", password, new RNCryptorNative.Callback() {
  @Override
  public void done(String encrypted, Exception e) {
      System.out.println("encrypted async: " + encrypted);
  }
});

//Decrypt
RNCryptorNative.decryptAsync(encrypted, password, new RNCryptorNative.Callback() {
  @Override
  public void done(String decrypted, Exception e) {
      System.out.println("decrypted async: " + decrypted);
  }
});

//Working with files

//Encrypt

RNCryptorNative.encryptFile(new File("path/to/original"), new File("path/to/encrypted"), "password");

//Decrypt

RNCryptorNative.decryptFile(new File("path/to/encrypted"), new File("path/to/decrypted"), "password");

Benchmark:

You might know that JNCryptor (Java port for RNCryptor) already exists. But there is a huge problem - performance. This is why RNCryptorNative is better solution. Screenshots of benchmarks:

| | |

Credits

Rob Napier, RNCryptor Team, MPAndroidChart