Skip to content

Commit

Permalink
publish project
Browse files Browse the repository at this point in the history
  • Loading branch information
exo committed Jun 16, 2020
0 parents commit c29cbaa
Show file tree
Hide file tree
Showing 47 changed files with 3,377 additions and 0 deletions.
90 changes: 90 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
results/
target/
.idea/
.idea/*

# Built application files
*.apk
*.aar
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/

# Google Services (e.g. APIs or Firebase)
# google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

# Version control
vcs.xml

# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "examples/bc-java"]
path = examples/bc-java
url = https://github.com/bcgit/bc-java
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Getting started

Run the following command to initialize the git submodules:

```
git submodule update --init --recursive
```

Then run the tests via

```
./run-tests.sh
```

The output can be found in the directory `results`.

## Running

use the following maven command to run the program:

```
mvn compile exec:exec -DappRoot=<appRoot> -DlibPath=<libPath>
```

Example:

```
mvn compile exec:exec -DappRoot=../app-debug/sources -DlibPath=../bc-java/core/src/main/java
```
1 change: 1 addition & 0 deletions examples/bc-java
Submodule bc-java added at a529fa
4 changes: 4 additions & 0 deletions examples/bouncydroid/config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
d.a.a.j.c org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher
d.a.a.i.a org.bouncycastle.crypto.engines.AESEngine
d.a.a.k.a org.bouncycastle.crypto.params.KeyParameter
d.a.a.a org.bouncycastle.crypto.BlockCipher
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package androidx.core.graphics.drawable;

import android.content.res.ColorStateList;
import android.os.Parcelable;
import android.support.v4.graphics.drawable.IconCompat;
import b.a.a;

public class IconCompatParcelizer {
public static IconCompat read(a parcel) {
IconCompat obj = new IconCompat();
obj.f787a = parcel.a(obj.f787a, 1);
obj.f789c = parcel.a(obj.f789c, 2);
obj.f790d = parcel.a(obj.f790d, 3);
obj.e = parcel.a(obj.e, 4);
obj.f = parcel.a(obj.f, 5);
obj.g = (ColorStateList) parcel.a(obj.g, 6);
obj.i = parcel.a(obj.i, 7);
obj.c();
return obj;
}

public static void write(IconCompat obj, a parcel) {
parcel.i();
parcel.c();
obj.a(false);
parcel.b(obj.f787a, 1);
parcel.b(obj.f789c, 2);
parcel.b(obj.f790d, 3);
parcel.b(obj.e, 4);
parcel.b(obj.f, 5);
parcel.b((Parcelable) obj.g, 6);
parcel.b(obj.i, 7);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package androidx.versionedparcelable;

import b.a.c;

public abstract class CustomVersionedParcelable implements c {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package androidx.versionedparcelable;

import android.os.Parcel;
import android.os.Parcelable;
import b.a.b;
import b.a.c;

public class ParcelImpl implements Parcelable {
public static final Parcelable.Creator<ParcelImpl> CREATOR = new a();

/* renamed from: b reason: collision with root package name */
public final c f886b;

public ParcelImpl(Parcel in) {
this.f886b = new b(in).h();
}

public int describeContents() {
return 0;
}

public void writeToParcel(Parcel dest, int flags) {
new b(dest).a(this.f886b);
}

public static class a implements Parcelable.Creator<ParcelImpl> {
public ParcelImpl createFromParcel(Parcel in) {
return new ParcelImpl(in);
}

public ParcelImpl[] newArray(int size) {
return new ParcelImpl[size];
}
}
}
49 changes: 49 additions & 0 deletions examples/bouncydroid/jadx/at/acn2020/bouncydroid/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package at.acn2020.bouncydroid;

import a.b.e.a.c;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import c.a.a.a;
import java.io.ByteArrayOutputStream;
import java.io.StringBufferInputStream;
import java.security.SecureRandom;
import javax.crypto.spec.SecretKeySpec;

public class MainActivity extends c {
public static final char[] p = "0123456789ABCDEF".toCharArray();
public EditText n;
public EditText o;

public static String a(byte[] bytes) {
char[] hexChars = new char[(bytes.length * 2)];
for (int j = 0; j < bytes.length; j++) {
int v = bytes[j] & 255;
char[] cArr = p;
hexChars[j * 2] = cArr[v >>> 4];
hexChars[(j * 2) + 1] = cArr[v & 15];
}
return new String(hexChars);
}

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView((int) R.layout.activity_main);
this.n = (EditText) findViewById(R.id.plaintext);
this.o = (EditText) findViewById(R.id.ciphertext);
byte[] keyBytes = new byte[32];
new SecureRandom().nextBytes(keyBytes);
new SecretKeySpec(keyBytes, "AES");
}

public void encrypt(View view) {
String pt = this.n.getText().toString();
Log.d("test", pt);
a encrypter = new a();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
encrypter.a(new StringBufferInputStream(pt), baos);
this.o.setText(a(baos.toByteArray()), TextView.BufferType.EDITABLE);
}
}
Loading

0 comments on commit c29cbaa

Please sign in to comment.