The Android Developer Challenge is back! Submit your idea before December 2.

MasterKeys

class MasterKeys
kotlin.Any
   ↳ androidx.security.crypto.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

Public constructors

Convenient methods to create and obtain master keys in Android Keystore.

Public methods

static String
getOrCreate(@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.

Properties

static KeyGenParameterSpec

Public constructors

<init>

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.

Public methods

getOrCreate

@NonNull static fun getOrCreate(@NonNull keyGenParameterSpec: KeyGenParameterSpec): String

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
keyGenParameterSpec KeyGenParameterSpec: The key encryption scheme
Return
String: The key alias for the master key

Properties

AES256_GCM_SPEC

@NonNull static val AES256_GCM_SPEC: KeyGenParameterSpec