RSA crypto example
Android RSA Open Source
The RSA encryption algorithm provides higher resistance against decoding than AES
Full working example in Java
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="*"
app:layout_constraintBottom_toBottomOf="parent"
android:id="@+id/tableLayout1">
<TableRow
android:id="@+id/tableRow1"
android:layout_width="match_parent"
android:layout_height="250dp">
<TextView
android:id="@+id/TXTV"
android:layout_width="match_parent"
android:layout_height="250dp"
android:text="RSA"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="match_parent"
android:layout_height="250dp">
<TextView
android:id="@+id/textViewEncoded"
android:layout_width="match_parent"
android:layout_height="250dp"
android:text="textViewEncoded"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</TableRow>
<TableRow
android:id="@+id/tableRow3"
android:layout_width="match_parent"
android:layout_height="250dp">
<TextView
android:id="@+id/textViewDecoded"
android:layout_width="match_parent"
android:layout_height="250dp"
android:text="textViewDecoded"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</TableRow>
</TableLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
Valery Shmelev https://www.linkedin.com/in/valery-shmelev-479206227/
Android RSA Open Source
Comments
Post a Comment