0

我当前的 Android 应用程序正在调查加密库的使用com.google.crypto.tink

com.google.crypto.tink.integration.android.AndroidKeysetManager Builder使用 sharedPrefs 如下所示

@get:Throws(IOException::class, GeneralSecurityException::class)
private val orGenerateNewKeysetHandle: KeysetHandle
    get() = AndroidKeysetManager.Builder()
        .withSharedPref(this@TinkApplication, TINK_KEYSET_NAME, PREF_FILE_NAME)
        .withKeyTemplate(KeyTemplates.get("AES256_GCM"))
        .withMasterKeyUri(MASTER_KEY_URI)
        .build()
        .keysetHandle

是否有androidx.datastore不推荐使用共享首选项的版本?

是否由这个库的用户开发扩展功能来支持androidx.datastore

4

0 回答 0