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)

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)

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