Skip to content

Instantly share code, notes, and snippets.

@hero78
hero78 / RSACipher.java
Created September 14, 2018 07:57 — forked from awesometic/RSACipher.java
RSA encryption example for android
/**
* Created by Awesometic
* It's encrypt returns Base64 encoded, and also decrypt for Base64 encoded cipher
* references: http://stackoverflow.com/questions/12471999/rsa-encryption-decryption-in-android
*/
import android.util.Base64;
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
import java.security.KeyFactory;