Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.

Builder

class Builder
kotlin.Any
   ↳ androidx.security.crypto.EncryptedFile.Builder

Builder class to configure EncryptedFile

Summary

Public constructors
<init>(@NonNull file: File, @NonNull context: Context, @NonNull masterKeyAlias: String, @NonNull fileEncryptionScheme: EncryptedFile.FileEncryptionScheme)

Builder for an EncryptedFile.

<init>(@NonNull context: Context, @NonNull file: File, @NonNull masterKey: MasterKey, @NonNull fileEncryptionScheme: EncryptedFile.FileEncryptionScheme)

Builder for an EncryptedFile.

Public methods
EncryptedFile

EncryptedFile.Builder
setKeysetAlias(@NonNull keysetAlias: String)

EncryptedFile.Builder
setKeysetPrefName(@NonNull keysetPrefName: String)

Public constructors

<init>

Builder(
    @NonNull file: File,
    @NonNull context: Context,
    @NonNull masterKeyAlias: String,
    @NonNull fileEncryptionScheme: EncryptedFile.FileEncryptionScheme)

Deprecated: Use Builder(Context, File, MasterKey, FileEncryptionScheme) instead.

Builder for an EncryptedFile.

<init>

Builder(
    @NonNull context: Context,
    @NonNull file: File,
    @NonNull masterKey: MasterKey,
    @NonNull fileEncryptionScheme: EncryptedFile.FileEncryptionScheme)

Builder for an EncryptedFile.

Public methods

build

@NonNull fun build(): EncryptedFile
Return
EncryptedFile An EncryptedFile with the specified parameters.

setKeysetAlias

@NonNull fun setKeysetAlias(@NonNull keysetAlias: String): EncryptedFile.Builder
Parameters
keysetAlias String: The alias in the SharedPreferences file to store the keyset.
Return
EncryptedFile.Builder This Builder

setKeysetPrefName

@NonNull fun setKeysetPrefName(@NonNull keysetPrefName: String): EncryptedFile.Builder
Parameters
keysetPrefName String: The SharedPreferences file to store the keyset.
Return
EncryptedFile.Builder This Builder