MasterKeys
@RequiresApi(value = Build.VERSION_CODES.M)
public final class MasterKeys
Convenient methods to create and obtain master keys in Android Keystore.
The master keys are used to encrypt data encryption keys for encrypting files and preferences.
Summary
Constants |
|
|---|---|
static final @NonNull KeyGenParameterSpec |
This field is deprecated. Use |
Public methods |
|
|---|---|
static @NonNull String |
Creates or gets the master key provided |
Constants
Public methods
public static @NonNull StringgetOrCreate(@NonNull KeyGenParameterSpec keyGenParameterSpec)
Creates or gets the master key provided
The encryption scheme is required fields to ensure that the type of encryption used is clear to developers.
| Parameters | |
|---|---|
@NonNull KeyGenParameterSpec keyGenParameterSpec |
The key encryption scheme |