Поправить часть кода Kotlin / Android
41 USDSoLoader вызывает ошибку:

Нужно переписать часть кода на Kotlin, который вызвает ошибку, используещий библиотеку:
implementation("com.facebook.conceal:conceal:2.0.1@aar")либо попытаться использовать библиотеку Soloader, у который этот баг поправлен:
implementation "com.avito.android:patched-soloader"
(для этого нужно будет настроить build.gradle).
Другой вариант — переписать код на другой библиотеке.
Вот код:
class SecurePreferencesImpl(
context: Context,
private val preferences: SharedPreferences
) : SecurePreferences {
private val entity: Entity = Entity.create(context.packageName)
private val crypto: Crypto
init {
SoLoader.init(context, false)
val keyChain = SharedPrefsBackedKeyChain(context, CryptoConfig.KEY_256)
crypto = AndroidConceal.get().createCrypto256Bits(keyChain)
}
override fun putSecureString(key: String, value: String) {
return preferences.edit().putString(key, encrypt(value)).apply()
}
override fun getSecureString(key: String): String? {
val encryptedText: String? = preferences.getString(key, null)
return if (encryptedText != null) decrypt(encryptedText) else null
}
private fun encrypt(plainText: String): String {
val cipherText = crypto.encrypt(plainText.toByteArray(), entity)
return Base64.encodeToString(cipherText, Base64.DEFAULT)
}
private fun decrypt(encryptedText: String): String {
return String(crypto.decrypt(Base64.decode(encryptedText, Base64.DEFAULT), entity))
}
}
-

Попробуйте это:
https://github.com/facebook/SoLoader/issues/46#issuecomment-639008052
Потом напишете, помогло ли
-
Спасибо Марк!!
Я сейчас попробую — и напишу здесь результат. В любом случае, очень благодарен за совет. -
Спасибо большое за совет!!
Я попробовал — на реальных устройствах стало писать что "Your device is not compatible with this version." -
Оно так не заработало, но давайте спишемся?!
-
Current freelance projects in the category Desktop Apps
Add pauses of 10-30 seconds between sending emails.Hello! I am looking for an experienced 1C / BAS (BAF) programmer to promptly resolve a technical issue with email distribution.Problem essence: We use the accounting program BAF (Business Automation Framework), version 2.0. Once a month, there is a need to send about 300 emails… Web Programming, Desktop Apps ∙ 5 days 1 hour back ∙ 10 proposals |
Reverse engineering of console utilities for querying SSD controllers (Flash ID)1. Purpose of the work Extraction of the application programming interface (API) for interaction with SSD/NVMe controllers from the provided set of console utilities (Phison, Silicon Motion, Realtek, Maxiotek, Marvell, JMicron, etc.). The result should be working code in C/C++… C & C++, Desktop Apps ∙ 5 days 13 hours back ∙ 6 proposals |
Modification in the emulator's operation
45 USD
Hello. I downloaded the Gaminator CF Final slot machine emulator from the Internet. I really liked it, but there are some issues. There is an admin panel, but it opens freely and cannot be closed at all. It only closes along with the application. Also, the data does not save… Desktop Apps ∙ 13 days 2 hours back ∙ 10 proposals |