Skip to content
This repository was archived by the owner on Dec 30, 2021. It is now read-only.

Commit 6ddf5cb

Browse files
committed
pre-release
0 parents commit 6ddf5cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+3052
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#built application files
2+
*.apk
3+
*.ap_
4+
*.aab
5+
6+
# files for the dex VM
7+
*.dex
8+
9+
# Java class files
10+
*.class
11+
12+
# generated files
13+
bin/
14+
gen/
15+
release/
16+
17+
# Local configuration file (sdk path, etc)
18+
local.properties
19+
20+
# Windows thumbnail db
21+
Thumbs.db
22+
23+
# OSX files
24+
.DS_Store
25+
26+
# Android Studio
27+
*.iml
28+
.idea
29+
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
30+
.gradle
31+
build/
32+
.navigation
33+
captures/
34+
output.json
35+
36+
#NDK
37+
obj/
38+
.externalNativeBuild

app/build.gradle

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
useLibrary 'org.apache.http.legacy'
5+
compileSdkVersion 30
6+
7+
defaultConfig {
8+
applicationId "com.dergoogler.aes"
9+
minSdkVersion 23
10+
targetSdkVersion 30
11+
versionCode 2453745
12+
versionName '5.3-pre-release'
13+
multiDexEnabled true
14+
testFunctionalTest true
15+
testHandleProfiling true
16+
}
17+
buildTypes {
18+
release {
19+
minifyEnabled false
20+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21+
multiDexEnabled true
22+
}
23+
}
24+
compileOptions {
25+
targetCompatibility JavaVersion.VERSION_1_8
26+
sourceCompatibility JavaVersion.VERSION_1_8
27+
}
28+
buildToolsVersion '30.0.2'
29+
}
30+
31+
dependencies {
32+
implementation fileTree(dir: 'libs', include: ['*.jar'])
33+
implementation 'androidx.appcompat:appcompat:1.2.0'
34+
implementation 'com.google.android.material:material:1.2.1'
35+
implementation 'com.github.bumptech.glide:glide:4.11.0'
36+
implementation 'com.google.code.gson:gson:2.8.6'
37+
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
38+
implementation 'com.github.tiagohm.MarkdownView:library:0.19.0'
39+
}

app/src/main/AndroidManifest.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
<manifest
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
package="com.dergoogler.aes">
6+
<application
7+
android:allowBackup="true"
8+
android:label="AES"
9+
android:icon="@mipmap/ic_launcher"
10+
android:largeHeap="true"
11+
android:usesCleartextTraffic="true"
12+
android:theme="@style/AppTheme">
13+
<activity
14+
android:name=".MainActivity"
15+
android:configChanges="orientation|screenSize|keyboardHidden|smallestScreenSize|screenLayout"
16+
android:hardwareAccelerated="true"
17+
android:screenOrientation="portrait"
18+
android:supportsPictureInPicture="true"
19+
android:windowSoftInputMode="stateHidden"
20+
tools:targetApi="n">
21+
<intent-filter>
22+
<actionandroid:name="android.intent.action.MAIN"/>
23+
<categoryandroid:name="android.intent.category.LAUNCHER"/>
24+
</intent-filter>
25+
</activity>
26+
<activity
27+
android:name=".TestHelpActivity"
28+
android:configChanges="orientation|screenSize|keyboardHidden|smallestScreenSize|screenLayout"
29+
android:hardwareAccelerated="true"
30+
android:supportsPictureInPicture="true"
31+
android:screenOrientation="portrait"
32+
android:windowSoftInputMode="stateHidden"
33+
tools:targetApi="n" />
34+
<uses-library
35+
android:name="org.apache.http.legacy"
36+
android:required="false"/>
37+
</application>
38+
</manifest>
136 KB
Binary file not shown.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
![app image](https://play-lh.googleusercontent.com/hVb5mbZDDRum0rUtNYSMp_12ANIyK3D1TRJqN3QgcBbzrCF7-LVlOsWDwDgOGytZgpQ=s180-rw)
2+
# AES Encoder
3+
An simple aes encoder
4+
5+
## 🤨 Functions
6+
- basic aes encode
7+
- encode with random key (use at your own risk)
8+
- encode with own key
9+
- copy your results
10+
- open source (MIT Licence)~~(You need to give credits)
11+
12+
## 🗑 others
13+
- minimu space use is 5-7MB
14+
- simple design
15+
- includes this readme
16+
17+
## Licence
18+
```
19+
MIT License
20+
21+
Copyright (c) 2020 Jimmy Böhm (Der_Googler)
22+
23+
Permission is hereby granted, free of charge, to any person obtaining a copy
24+
of this software and associated documentation files (the "Software"), to deal
25+
in the Software without restriction, including without limitation the rights
26+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
27+
copies of the Software, and to permit persons to whom the Software is
28+
furnished to do so, subject to the following conditions:
29+
30+
The above copyright notice and this permission notice shall be included in all
31+
copies or substantial portions of the Software.
32+
33+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
38+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39+
SOFTWARE.
40+
```
23.5 KB
Loading
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
package com.dergoogler.aes;
2+
3+
import android.app.Activity;
4+
import android.bluetooth.BluetoothAdapter;
5+
import android.bluetooth.BluetoothDevice;
6+
import android.content.Intent;
7+
8+
import java.util.ArrayList;
9+
import java.util.HashMap;
10+
import java.util.Set;
11+
import java.util.UUID;
12+
13+
public class BluetoothConnect {
14+
private static final String DEFAULT_UUID = "00001101-0000-1000-8000-00805F9B34FB";
15+
16+
private Activity activity;
17+
18+
private BluetoothAdapter bluetoothAdapter;
19+
20+
public BluetoothConnect(Activity activity) {
21+
this.activity = activity;
22+
this.bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
23+
}
24+
25+
public boolean isBluetoothEnabled() {
26+
if(bluetoothAdapter != null) return true;
27+
28+
return false;
29+
}
30+
31+
public boolean isBluetoothActivated() {
32+
if(bluetoothAdapter == null) return false;
33+
34+
return bluetoothAdapter.isEnabled();
35+
}
36+
37+
public void activateBluetooth() {
38+
Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
39+
activity.startActivity(intent);
40+
}
41+
42+
public String getRandomUUID() {
43+
return String.valueOf(UUID.randomUUID());
44+
}
45+
46+
public void getPairedDevices(ArrayList<HashMap<String, Object>> results) {
47+
Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();
48+
49+
if(pairedDevices.size() > 0) {
50+
for(BluetoothDevice device : pairedDevices) {
51+
HashMap<String, Object> result = new HashMap<>();
52+
result.put("name", device.getName());
53+
result.put("address", device.getAddress());
54+
55+
results.add(result);
56+
}
57+
}
58+
}
59+
60+
public void readyConnection(BluetoothConnectionListener listener, String tag) {
61+
if(BluetoothController.getInstance().getState().equals(BluetoothController.STATE_NONE)) {
62+
BluetoothController.getInstance().start(this, listener, tag, UUID.fromString(DEFAULT_UUID), bluetoothAdapter);
63+
}
64+
}
65+
66+
public void readyConnection(BluetoothConnectionListener listener, String uuid, String tag) {
67+
if(BluetoothController.getInstance().getState().equals(BluetoothController.STATE_NONE)) {
68+
BluetoothController.getInstance().start(this, listener, tag, UUID.fromString(uuid), bluetoothAdapter);
69+
}
70+
}
71+
72+
73+
public void startConnection(BluetoothConnectionListener listener, String address, String tag) {
74+
BluetoothDevice device = bluetoothAdapter.getRemoteDevice(address);
75+
76+
BluetoothController.getInstance().connect(device, this, listener, tag, UUID.fromString(DEFAULT_UUID), bluetoothAdapter);
77+
}
78+
79+
public void startConnection(BluetoothConnectionListener listener, String uuid, String address, String tag) {
80+
BluetoothDevice device = bluetoothAdapter.getRemoteDevice(address);
81+
82+
BluetoothController.getInstance().connect(device, this, listener, tag, UUID.fromString(uuid), bluetoothAdapter);
83+
}
84+
85+
public void stopConnection(BluetoothConnectionListener listener, String tag) {
86+
BluetoothController.getInstance().stop(this, listener, tag);
87+
}
88+
89+
public void sendData(BluetoothConnectionListener listener, String data, String tag) {
90+
String state = BluetoothController.getInstance().getState();
91+
92+
if(!state.equals(BluetoothController.STATE_CONNECTED)) {
93+
listener.onConnectionError(tag, state, "Bluetooth is not connected yet");
94+
return;
95+
}
96+
97+
BluetoothController.getInstance().write(data.getBytes());
98+
}
99+
100+
public Activity getActivity() {
101+
return activity;
102+
}
103+
104+
public interface BluetoothConnectionListener {
105+
void onConnected(String tag, HashMap<String, Object> deviceData);
106+
void onDataReceived(String tag, byte[] data, int bytes);
107+
void onDataSent(String tag, byte[] data);
108+
void onConnectionError(String tag, String connectionState, String message);
109+
void onConnectionStopped(String tag);
110+
}
111+
}

0 commit comments

Comments
 (0)