From ebd67dd227aec2225e22b11bf078c1dab61e1ef6 Mon Sep 17 00:00:00 2001 From: Gabriel Costa Date: Fri, 11 Oct 2019 14:13:09 -0300 Subject: [PATCH] Bump conceal to version 2.0.2 --- build.gradle | 2 +- .../java/com/orhanobut/hawk/ConcealEncryptionTest.kt | 5 +++++ .../src/androidTest/java/com/orhanobut/hawk/ConcealTest.kt | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 06e7a44..8f33b3d 100644 --- a/build.gradle +++ b/build.gradle @@ -55,7 +55,7 @@ ext { ext.deps = [ gson : 'com.google.code.gson:gson:2.8.2', - conceal : 'com.facebook.conceal:conceal:1.1.3@aar', + conceal : 'com.facebook.conceal:conceal:2.0.2', // Test dependencies junit : 'junit:junit:4.12', diff --git a/hawk/src/androidTest/java/com/orhanobut/hawk/ConcealEncryptionTest.kt b/hawk/src/androidTest/java/com/orhanobut/hawk/ConcealEncryptionTest.kt index e713a9f..05a806f 100644 --- a/hawk/src/androidTest/java/com/orhanobut/hawk/ConcealEncryptionTest.kt +++ b/hawk/src/androidTest/java/com/orhanobut/hawk/ConcealEncryptionTest.kt @@ -2,6 +2,7 @@ package com.orhanobut.hawk import android.support.test.InstrumentationRegistry import android.support.test.runner.AndroidJUnit4 +import com.facebook.soloader.SoLoader import org.junit.Before import org.junit.Test @@ -18,6 +19,10 @@ class ConcealEncryptionTest { encryption = ConcealEncryption(InstrumentationRegistry.getContext()) } + @Before fun prepareSo() { + SoLoader.init(InstrumentationRegistry.getContext(), false) + } + @Test fun init() { assertThat(encryption.init()).isTrue() } diff --git a/hawk/src/androidTest/java/com/orhanobut/hawk/ConcealTest.kt b/hawk/src/androidTest/java/com/orhanobut/hawk/ConcealTest.kt index 5681cf5..7c030e5 100644 --- a/hawk/src/androidTest/java/com/orhanobut/hawk/ConcealTest.kt +++ b/hawk/src/androidTest/java/com/orhanobut/hawk/ConcealTest.kt @@ -7,6 +7,7 @@ import com.facebook.android.crypto.keychain.SharedPrefsBackedKeyChain import com.facebook.crypto.Crypto import com.facebook.crypto.CryptoConfig import com.facebook.crypto.Entity +import com.facebook.soloader.SoLoader import com.google.common.truth.Truth.assertThat import org.junit.Before import org.junit.Test @@ -18,11 +19,17 @@ class ConcealTest { private lateinit var crypto: Crypto @Before fun setup() { + SoLoader.init(InstrumentationRegistry.getContext(), false) + val context = InstrumentationRegistry.getContext() val keyChain = SharedPrefsBackedKeyChain(context, CryptoConfig.KEY_256) crypto = AndroidConceal.get().createDefaultCrypto(keyChain) } + @Before fun prepareSo() { + SoLoader.init(InstrumentationRegistry.getContext(), false) + } + @Test fun cryptoIsAvailable() { assertThat(crypto.isAvailable).isTrue() }