File tree Expand file tree Collapse file tree
android/src/main/java/br/com/classapp/RNSensitiveInfo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ private void initKeyStore() {
261261 try {
262262 if (!mKeyStore .containsAlias (KEY_ALIAS )) {
263263 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .M ) {
264- KeyGenerator keyGenerator = KeyGenerator .getInstance (KeyProperties .KEY_ALGORITHM_RSA , ANDROID_KEYSTORE_PROVIDER );
264+ KeyGenerator keyGenerator = KeyGenerator .getInstance (KeyProperties .KEY_ALGORITHM_AES , ANDROID_KEYSTORE_PROVIDER );
265265 keyGenerator .init (
266266 new KeyGenParameterSpec .Builder (KEY_ALIAS ,
267267 KeyProperties .PURPOSE_ENCRYPT | KeyProperties .PURPOSE_DECRYPT )
@@ -544,8 +544,8 @@ public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult re
544544
545545 public String encrypt (String input ) throws Exception {
546546 byte [] bytes = input .getBytes ();
547-
548547 Cipher c ;
548+
549549 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .M ) {
550550 Key secretKey = ((KeyStore .SecretKeyEntry ) mKeyStore .getEntry (KEY_ALIAS , null )).getSecretKey ();
551551 c = Cipher .getInstance (AES_GCM );
You can’t perform that action at this time.
0 commit comments