Source:
<code>public void getGenericPasswordForOptions(String service, Promise promise) { String originalService = service; service = service == null ? DEFAULT_ALIAS : service; try { byte[] recuser = getBytesFromPrefs(service, DELIMITER + "u"); byte[] recpass = getBytesFromPrefs(service, DELIMITER + "p"); if (recuser == null || recpass == null) { ResultSet resultSet = getGenericPasswordForOptionsUsingConceal(originalService); if (resultSet != null) { setGenericPasswordForOptions( originalService, new String(resultSet.decryptedUsername, Charset.forName("UTF-8")), <START> new String(resultSet.decryptedUsername, Charset.forName("UTF-8"))); <END> resetGenericPasswordForOptionsLegacy(originalService); recuser = resultSet.decryptedUsername; recpass = resultSet.decryptedPassword; } else { Log.e(KEYCHAIN_MODULE, "no keychain entry found for service: " + service); promise.resolve(false); return; } } KeyStore keyStore = getKeyStoreAndLoad(); Key key = keyStore.getKey(service, null); byte[] decryptedUsername = decryptBytes(key, recuser); byte[] decryptedPassword = decryptBytes(key, recpass); WritableMap credentials = Arguments.createMap(); credentials.putString("service", service); credentials.putString("username", new String(decryptedUsername, Charset.forName("UTF-8"))); credentials.putString("password", new String(decryptedPassword, Charset.forName("UTF-8"))); promise.resolve(credentials); } catch (KeyStoreException e) { Log.e(KEYCHAIN_MODULE, e.getMessage()); promise.reject(E_UNSUPPORTED_KEYSTORE, e); } catch (KeyStoreAccessException e) { Log.e(KEYCHAIN_MODULE, e.getMessage()); promise.reject(E_KEYSTORE_ACCESS_ERROR, e); } catch (UnrecoverableKeyException | NoSuchAlgorithmException | CryptoFailedException e) { Log.e(KEYCHAIN_MODULE, e.getMessage()); promise.reject(E_CRYPTO_FAILED, e); } catch (EmptyParameterException e) { Log.e(KEYCHAIN_MODULE, e.getMessage()); promise.reject(E_EMPTY_PARAMETERS, e); } }</code><technical_language>@pcoltau this decryptedPassword</technical_language>

Target:
public void getGenericPasswordForOptions(String service, Promise promise) { try { service = getDefaultServiceIfNull(service); CipherStorage currentCipherStorage = getCipherStorageForCurrentAPILevel(); final DecryptionResult decryptionResult; ResultSet resultSet = prefsStorage.getEncryptedEntry(service); if (resultSet == null) { Log.e(KEYCHAIN_MODULE, "No entry found for service: " + service); promise.resolve(false); return; } if (resultSet.cipherStorageName.equals(currentCipherStorage.getCipherStorageName())) { decryptionResult = currentCipherStorage.decrypt(service, resultSet.usernameBytes, resultSet.passwordBytes); } else { CipherStorage oldCipherStorage = getCipherStorageByName(resultSet.cipherStorageName); decryptionResult = oldCipherStorage.decrypt(service, resultSet.usernameBytes, resultSet.passwordBytes); EncryptionResult encryptionResult = currentCipherStorage.encrypt(service, decryptionResult.username, decryptionResult.password); prefsStorage.storeEncryptedEntry(service, encryptionResult); oldCipherStorage.removeKey(service); } WritableMap credentials = Arguments.createMap(); credentials.putString("service", service); credentials.putString("username", decryptionResult.username); credentials.putString("password", decryptionResult.password); promise.resolve(credentials); } catch (KeyStoreAccessException e) { Log.e(KEYCHAIN_MODULE, e.getMessage()); promise.reject(E_KEYSTORE_ACCESS_ERROR, e); } catch (CryptoFailedException e) { Log.e(KEYCHAIN_MODULE, e.getMessage()); promise.reject(E_CRYPTO_FAILED, e); } }