Skip to content

Commit

Permalink
chore: make key available only with unlocked device (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyAfternoons authored Apr 16, 2024
1 parent c7f01c5 commit e9d3fe6
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ class IoReactNativeIntegrityModule(reactContext: ReactApplicationContext) :
.setDigests(KeyProperties.DIGEST_SHA256).setKeySize(256).setAttestationChallenge(challenge)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && hasStrongBox) {
builder.setIsStrongBoxBacked(true)
builder.setUnlockedDeviceRequired(true)
}
val keyPairGenerator = KeyPairGenerator.getInstance(
KeyProperties.KEY_ALGORITHM_EC, KEYSTORE_PROVIDER
Expand Down

0 comments on commit e9d3fe6

Please sign in to comment.