diff --git a/app/build.gradle b/app/build.gradle index d67201eb..4f57dc03 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -24,8 +24,7 @@ android { } lintOptions { abortOnError false - } - } + } } dependencies { diff --git a/app/src/androidTest/java/net/bierbaumer/otp_authenticator/MainActivityTest.java b/app/src/androidTest/java/net/bierbaumer/otp_authenticator/MainActivityTest.java index ef66b92a..d866122d 100644 --- a/app/src/androidTest/java/net/bierbaumer/otp_authenticator/MainActivityTest.java +++ b/app/src/androidTest/java/net/bierbaumer/otp_authenticator/MainActivityTest.java @@ -5,14 +5,7 @@ import android.app.Activity; import android.app.Instrumentation; import android.content.Intent; import android.support.test.InstrumentationRegistry; -import android.support.test.espresso.ViewAction; -import android.support.test.espresso.action.GeneralLocation; -import android.support.test.espresso.action.GeneralSwipeAction; -import android.support.test.espresso.action.Press; -import android.support.test.espresso.action.Swipe; -import android.support.test.espresso.action.ViewActions; import android.support.test.espresso.intent.Intents; -import android.support.test.uiautomator.UiCollection; import android.support.test.uiautomator.UiDevice; import android.support.test.uiautomator.UiObject; import android.support.test.uiautomator.UiObjectNotFoundException; @@ -20,7 +13,6 @@ import android.support.test.uiautomator.UiSelector; import android.support.v7.widget.ActionBarContextView; import android.test.ActivityInstrumentationTestCase2; import android.test.ViewAsserts; -import android.util.Log; import android.view.View; import android.widget.ListView; @@ -41,19 +33,15 @@ import java.util.ArrayList; import static android.support.test.espresso.Espresso.onData; import static android.support.test.espresso.Espresso.onView; import static android.support.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu; -import static android.support.test.espresso.action.ViewActions.actionWithAssertions; -import static android.support.test.espresso.action.ViewActions.clearText; import static android.support.test.espresso.action.ViewActions.click; import static android.support.test.espresso.action.ViewActions.longClick; import static android.support.test.espresso.action.ViewActions.pressBack; -import static android.support.test.espresso.action.ViewActions.swipeDown; import static android.support.test.espresso.action.ViewActions.typeText; import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist; import static android.support.test.espresso.assertion.ViewAssertions.matches; import static android.support.test.espresso.intent.Intents.intended; import static android.support.test.espresso.intent.Intents.intending; import static android.support.test.espresso.intent.matcher.IntentMatchers.hasAction; -import static android.support.test.espresso.intent.matcher.IntentMatchers.hasExtra; import static android.support.test.espresso.matcher.ViewMatchers.isDescendantOfA; import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; import static android.support.test.espresso.matcher.ViewMatchers.withClassName; diff --git a/app/src/main/java/net/bierbaumer/otp_authenticator/EncryptionHelper.java b/app/src/main/java/net/bierbaumer/otp_authenticator/EncryptionHelper.java index acd5aa59..ba01522e 100644 --- a/app/src/main/java/net/bierbaumer/otp_authenticator/EncryptionHelper.java +++ b/app/src/main/java/net/bierbaumer/otp_authenticator/EncryptionHelper.java @@ -24,10 +24,9 @@ import static net.bierbaumer.otp_authenticator.Utils.readFully; import static net.bierbaumer.otp_authenticator.Utils.writeFully; public class EncryptionHelper { - public final static int KEY_LENGTH = 16; - public final static int IV_LENGTH = 12; - - public final static String ALGORITHM = "AES/GCM/NoPadding"; + private final static String ALGORITHM = "AES/GCM/NoPadding"; + private final static int KEY_LENGTH = 16; + private final static int IV_LENGTH = 12; public static byte[] encrypt(SecretKey secretKey, IvParameterSpec iv, byte[] plainText) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, UnsupportedEncodingException, BadPaddingException, IllegalBlockSizeException { Cipher cipher = Cipher.getInstance(ALGORITHM);