diff --git a/.gitignore b/.gitignore
index 921bd0a9..980085e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -65,6 +65,8 @@ captures/
.idea/uiDesigner.xml
.idea/runConfigurations.xml
.idea/discord.xml
+.idea/migrations.xml
+.idea/androidTestResultsUserPreferences.xml
# Keystore files
*.jks
diff --git a/.idea/migrations.xml b/.idea/migrations.xml
deleted file mode 100644
index f8051a6f..00000000
--- a/.idea/migrations.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index c0caf1dd..b60dc3b4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -142,7 +142,9 @@ android {
packagingOptions {
resources {
excludes += ['META-INF/library_release.kotlin_module',
- 'META-INF/library-core_release.kotlin_module']
+ 'META-INF/library-core_release.kotlin_module',
+ 'META-INF/LICENSE.md',
+ 'META-INF/LICENSE-notice.md']
}
}
diff --git a/app/src/androidTest/java/io/github/wulkanowy/utils/security/ScramblerTest.kt b/app/src/androidTest/java/io/github/wulkanowy/utils/security/ScramblerTest.kt
index 0c47e6bb..1b0319f6 100644
--- a/app/src/androidTest/java/io/github/wulkanowy/utils/security/ScramblerTest.kt
+++ b/app/src/androidTest/java/io/github/wulkanowy/utils/security/ScramblerTest.kt
@@ -14,34 +14,37 @@ import kotlin.test.assertFailsWith
@RunWith(AndroidJUnit4::class)
class ScramblerTest {
+ private val scrambler = Scrambler(ApplicationProvider.getApplicationContext())
+
@Test
fun encryptDecryptTest() {
- assertEquals("TEST", decrypt(encrypt("TEST",
- ApplicationProvider.getApplicationContext())))
+ assertEquals(
+ "TEST", scrambler.decrypt(scrambler.encrypt("TEST"))
+ )
}
@Test
fun emptyTextEncryptTest() {
assertFailsWith {
- decrypt("")
+ scrambler.decrypt("")
}
assertFailsWith {
- encrypt("", ApplicationProvider.getApplicationContext())
+ scrambler.encrypt("")
}
}
@Test
@SdkSuppress(minSdkVersion = 18)
fun emptyKeyStoreTest() {
- val text = encrypt("test", ApplicationProvider.getApplicationContext())
+ val text = scrambler.encrypt("test")
val keyStore = KeyStore.getInstance("AndroidKeyStore")
keyStore.load(null)
keyStore.deleteEntry("wulkanowy_password")
assertFailsWith {
- decrypt(text)
+ scrambler.decrypt(text)
}
}
}