I wanted to use Tink library and able to encrypt and decrypt data but not understanding what is the purpose of master key in its creation and how to create a master key for it.
private fun getOrGenerateNewKeysetHandle(): KeysetHandle {
return AndroidKeysetManager.Builder()
.withSharedPref(activity, EFE_TINK_KEYSET_NAME, null)
.withKeyTemplate(AeadKeyTemplates.AES256_GCM)
.withMasterKeyUri("android-keystore://tink_master_key")
.build().keysetHandle
}
Here, how should I create tink_master_key?