create

fun create(context: Context, name: String): SharedPreferences

Creates or opens an encrypted preferences file with the given name.

Return

SharedPreferences instance with AES-256-SIV key encryption and AES-256-GCM value encryption.

Parameters

context

Application context used for keystore and file access.

name

Preferences file name (stored under the app's private data directory).