Android RSA Crypto Code
RSA Example We use the following Java code to encode text " Open Source Java Projects OFLAMERON " using the RSA algorithm and its subsequent decoding // Original text String testText = " Open Source Java Projects OFLAMERON "; TextView originalTextView = (TextView) findViewById(R.id.textViewOriginal); originalTextView.setText("[ORIGINAL]:\n" + testText + "\n"); // Generate key pair for 1024-bit RSA encryption and decryption Key publicKey = null; Key privateKey = null; try { KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA"); kpg.initialize(1024); //1024 Key KeyPair kp = kpg.genKeyPair(); publicKey = kp.getPublic(); //Public Key ...