Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

TGIO/RNCryptorNative

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
June 16, 2017 21:58
June 16, 2017 21:58
May 19, 2016 21:02
October 30, 2016 17:16
May 19, 2016 21:02
February 23, 2021 00:20
May 19, 2016 21:02
June 16, 2017 21:58
May 19, 2016 21:02
May 19, 2016 21:02
May 19, 2016 21:02
May 19, 2016 21:02
May 19, 2016 21:02

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

About

Android JNI model implementation of Rob Napier's RNCryptor.

Resources

License

Stars

Watchers

Forks

Packages

No packages published