diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 5edb4ee..0000000 --- a/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/libraries -/.idea/modules.xml -/.idea/workspace.xml -.DS_Store -/build -/captures -.externalNativeBuild diff --git a/.gradle/4.10/fileChanges/last-build.bin b/.gradle/4.10/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/.gradle/4.10/fileChanges/last-build.bin differ diff --git a/.gradle/4.10/fileHashes/fileHashes.bin b/.gradle/4.10/fileHashes/fileHashes.bin new file mode 100644 index 0000000..7f1cbe9 Binary files /dev/null and b/.gradle/4.10/fileHashes/fileHashes.bin differ diff --git a/.gradle/4.10/fileHashes/fileHashes.lock b/.gradle/4.10/fileHashes/fileHashes.lock new file mode 100644 index 0000000..e49d8ad Binary files /dev/null and b/.gradle/4.10/fileHashes/fileHashes.lock differ diff --git a/.gradle/4.10/gc.properties b/.gradle/4.10/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/4.10/taskHistory/taskHistory.bin b/.gradle/4.10/taskHistory/taskHistory.bin new file mode 100644 index 0000000..98ab24a Binary files /dev/null and b/.gradle/4.10/taskHistory/taskHistory.bin differ diff --git a/.gradle/4.10/taskHistory/taskHistory.lock b/.gradle/4.10/taskHistory/taskHistory.lock new file mode 100644 index 0000000..95c8a4e Binary files /dev/null and b/.gradle/4.10/taskHistory/taskHistory.lock differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..8944c66 Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..861517c --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Sun Sep 29 23:01:46 CEST 2019 +gradle.version=4.10 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..9655919 Binary files /dev/null and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..b594f20 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +applock \ No newline at end of file diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser deleted file mode 100644 index f37b898..0000000 Binary files a/.idea/caches/build_file_checksums.ser and /dev/null differ diff --git a/.idea/gradle.xml b/.idea/gradle.xml index df527ea..267d99c 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -8,9 +8,9 @@ + diff --git a/.idea/misc.xml b/.idea/misc.xml index 7bfef59..df16551 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,9 +1,7 @@ - - - - - \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml deleted file mode 100644 index e96534f..0000000 --- a/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..ec5fb2f --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + 1.8 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore deleted file mode 100644 index 796b96d..0000000 --- a/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/app/build.gradle b/app/build.gradle deleted file mode 100644 index 4c33808..0000000 --- a/app/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -apply plugin: 'com.android.application' - -android { - compileSdkVersion 28 - defaultConfig { - applicationId "com.lowlevelsubmarine.applock" - minSdkVersion 16 - targetSdkVersion 28 - versionCode 1 - versionName "1.0.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:28.0.0' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' -} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro deleted file mode 100644 index f1b4245..0000000 --- a/app/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/app/src/androidTest/java/com/lowlevelsubmarine/applock/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/lowlevelsubmarine/applock/ExampleInstrumentedTest.java deleted file mode 100644 index 850a3ed..0000000 --- a/app/src/androidTest/java/com/lowlevelsubmarine/applock/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.lowlevelsubmarine.applock; - -import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); - - assertEquals("com.lowlevelsubmarine.applock", appContext.getPackageName()); - } -} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml deleted file mode 100644 index 38dec5d..0000000 --- a/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/app/src/main/java/com/lowlevelsubmarine/applock/UnsupportedDeviceException.java b/app/src/main/java/com/lowlevelsubmarine/applock/UnsupportedDeviceException.java deleted file mode 100644 index 2086242..0000000 --- a/app/src/main/java/com/lowlevelsubmarine/applock/UnsupportedDeviceException.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.lowlevelsubmarine.applock; - -public class UnsupportedDeviceException extends Exception { -} diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml deleted file mode 100644 index 6348baa..0000000 --- a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index 867f14a..0000000 --- a/app/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index bbd3e02..0000000 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml deleted file mode 100644 index bbd3e02..0000000 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index a2f5908..0000000 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 1b52399..0000000 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index ff10afd..0000000 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index 115a4c7..0000000 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index dcd3cd8..0000000 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 459ca60..0000000 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 8ca12fe..0000000 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 8e19b41..0000000 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index b824ebd..0000000 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 4c19a13..0000000 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml deleted file mode 100644 index 3ab3e9c..0000000 --- a/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - #3F51B5 - #303F9F - #FF4081 - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml deleted file mode 100644 index 479f657..0000000 --- a/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - AppLock - diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml deleted file mode 100644 index 5885930..0000000 --- a/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/app/src/test/java/com/lowlevelsubmarine/applock/ExampleUnitTest.java b/app/src/test/java/com/lowlevelsubmarine/applock/ExampleUnitTest.java deleted file mode 100644 index e01f43b..0000000 --- a/app/src/test/java/com/lowlevelsubmarine/applock/ExampleUnitTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.lowlevelsubmarine.applock; - -import org.junit.Test; - -import static org.junit.Assert.*; - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see Testing documentation - */ -public class ExampleUnitTest { - @Test - public void addition_isCorrect() { - assertEquals(4, 2 + 2); - } -} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 47825b2..c2dd7c4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,27 +1,16 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. +plugins { + id 'java' +} -buildscript { - - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.1.0' - +group 'com.lowlevelsubmarine' +version '1.1.0' - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} +sourceCompatibility = 1.8 -allprojects { - repositories { - google() - jcenter() - } +repositories { + mavenCentral() } -task clean(type: Delete) { - delete rootProject.buildDir +dependencies { + testCompile group: 'junit', name: 'junit', version: '4.12' } diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index 743d692..0000000 --- a/gradle.properties +++ /dev/null @@ -1,13 +0,0 @@ -# Project-wide Gradle settings. -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7a3265e..28861d2 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37b397e..115e6ac 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Thu Nov 08 20:21:02 CET 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip diff --git a/settings.gradle b/settings.gradle index e7b4def..2f81dac 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,2 @@ -include ':app' +rootProject.name = 'applock' + diff --git a/app/src/main/java/com/lowlevelsubmarine/applock/AppLock.java b/src/main/java/com/lowlevelsubmarine/applock/AppLock.java similarity index 96% rename from app/src/main/java/com/lowlevelsubmarine/applock/AppLock.java rename to src/main/java/com/lowlevelsubmarine/applock/AppLock.java index f2e6fe4..4e85ae3 100644 --- a/app/src/main/java/com/lowlevelsubmarine/applock/AppLock.java +++ b/src/main/java/com/lowlevelsubmarine/applock/AppLock.java @@ -12,7 +12,7 @@ public class AppLock { private final Cipher cipher = createCipher(); private final SecretKeySpec key; - public AppLock(byte[] key) throws InvalidKeyException { + public AppLock(byte[] key) { this.key = new SecretKeySpec(key, "AES"); } diff --git a/app/src/main/java/com/lowlevelsubmarine/applock/B64.java b/src/main/java/com/lowlevelsubmarine/applock/B64.java similarity index 54% rename from app/src/main/java/com/lowlevelsubmarine/applock/B64.java rename to src/main/java/com/lowlevelsubmarine/applock/B64.java index 061bb17..d208cc9 100644 --- a/app/src/main/java/com/lowlevelsubmarine/applock/B64.java +++ b/src/main/java/com/lowlevelsubmarine/applock/B64.java @@ -1,15 +1,15 @@ package com.lowlevelsubmarine.applock; -import android.util.Base64; +import java.util.Base64; public class B64 { public static String encode(byte[] decoded) { - return Base64.encodeToString(decoded, Base64.DEFAULT); + return Base64.getEncoder().encodeToString(decoded); } public static byte[] decode(String encoded) { - return Base64.decode(encoded, Base64.DEFAULT); + return Base64.getDecoder().decode(encoded); } }