Google は、黒人コミュニティに対する人種平等の促進に取り組んでいます。取り組みを見る

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 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 methods

getOrCreate

@NonNull @RequiresApi(23) 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 @RequiresApi(23) static val AES256_GCM_SPEC: KeyGenParameterSpec