Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump conceal to version 2.0.2 #238

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
}
Expand Down
7 changes: 7 additions & 0 deletions hawk/src/androidTest/java/com/orhanobut/hawk/ConcealTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
}
Expand Down