-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
139 changed files
with
5,106 additions
and
752 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# https://help.github.com/en/articles/about-code-owners | ||
|
||
* @PoornimaApptentive @ChaseApptentive | ||
* @PoornimaApptentive @frankus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
apptentive-core/src/main/java/apptentive/com/android/encryption/EncryptionKey.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
package apptentive.com.android.encryption | ||
|
||
import android.os.Build | ||
import android.security.keystore.KeyProperties | ||
import androidx.annotation.RequiresApi | ||
import apptentive.com.android.util.InternalUseOnly | ||
import apptentive.com.android.util.hexToBytes | ||
import javax.crypto.SecretKey | ||
import javax.crypto.spec.SecretKeySpec | ||
|
||
@InternalUseOnly | ||
data class EncryptionKey(val key: SecretKey? = null, val transformation: String = "") { | ||
companion object { | ||
val NO_OP: EncryptionKey = EncryptionKey() | ||
} | ||
} | ||
|
||
@RequiresApi(Build.VERSION_CODES.M) | ||
fun String.getKeyFromHexString(): SecretKey { | ||
return SecretKeySpec(hexToBytes(this), KeyProperties.KEY_ALGORITHM_AES) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
apptentive-core/src/main/java/apptentive/com/android/util/GeneralUtils.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package apptentive.com.android.util | ||
|
||
@InternalUseOnly | ||
fun isAllNull(vararg args: Any?): Boolean { | ||
return args.all { it == null } | ||
} | ||
|
||
@InternalUseOnly | ||
fun isAnyNull(vararg args: Any?): Boolean { | ||
return args.any { it == null } | ||
} | ||
|
||
@InternalUseOnly | ||
fun isNoneNull(vararg args: Any?): Boolean { | ||
return args.all { it != null } | ||
} |
Oops, something went wrong.