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
package xo.chilout.justtry.fingerprint; | |
import android.Manifest; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.support.v4.app.ActivityCompat; | |
import android.support.v4.hardware.fingerprint.FingerprintManagerCompat; | |
import android.support.v4.os.CancellationSignal; | |
import android.widget.Toast; |
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
2019-05-26 17:26:37.712 18345-18345/xo.chilout.justtry E/FirstThird Activity: cipherinitalize: InvalidKeyException | |
java.security.InvalidKeyException: Only SecretKey is supported | |
at com.android.org.conscrypt.OpenSSLCipher.checkAndSetEncodedKey(OpenSSLCipher.java:462) | |
at com.android.org.conscrypt.OpenSSLCipher.engineInit(OpenSSLCipher.java:284) | |
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984) | |
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891) | |
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796) | |
at javax.crypto.Cipher.chooseProvider(Cipher.java:773) | |
at javax.crypto.Cipher.init(Cipher.java:1143) | |
at javax.crypto.Cipher.init(Cipher.java:1084) |
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
private boolean cipherinitalize() { | |
try { | |
cipherObject = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" + KeyProperties.BLOCK_MODE_CBC + "/" + KeyProperties.ENCRYPTION_PADDING_PKCS7); | |
keyStoreObject.load(null); | |
SecretKey secretKeyObject = (SecretKey) keyStoreObject.getKey(key_name,null); | |
cipherObject.init(Cipher.ENCRYPT_MODE, secretKeyObject); | |
return true; | |
} catch (IOException e) { | |
e.printStackTrace(); | |
Log.e(TAG, "cipherinitalize: IOException error Occared", e); |
NewerOlder