public final class

EncryptedFile.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.security.crypto.EncryptedFile.Builder

Overview

Builder class to configure EncryptedFile

Summary

Constructors
publicBuilder(Context context, java.io.File file, MasterKey masterKey, EncryptedFile.FileEncryptionScheme fileEncryptionScheme)

Builder for an EncryptedFile.

publicBuilder(java.io.File file, Context context, java.lang.String masterKeyAlias, EncryptedFile.FileEncryptionScheme fileEncryptionScheme)

Builder for an EncryptedFile.

Methods
public EncryptedFilebuild()

public EncryptedFile.BuildersetKeysetAlias(java.lang.String keysetAlias)

public EncryptedFile.BuildersetKeysetPrefName(java.lang.String keysetPrefName)

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(java.io.File file, Context context, java.lang.String masterKeyAlias, EncryptedFile.FileEncryptionScheme fileEncryptionScheme)

Deprecated: Use EncryptedFile.Builder instead.

Builder for an EncryptedFile.

If the masterKeyAlias used here is for a key that is not yet created, this method will not be thread safe. Use the alternate signature that is not deprecated for multi-threaded contexts.

public Builder(Context context, java.io.File file, MasterKey masterKey, EncryptedFile.FileEncryptionScheme fileEncryptionScheme)

Builder for an EncryptedFile.

Methods

public EncryptedFile.Builder setKeysetPrefName(java.lang.String keysetPrefName)

Parameters:

keysetPrefName: The SharedPreferences file to store the keyset.

Returns:

This Builder

public EncryptedFile.Builder setKeysetAlias(java.lang.String keysetAlias)

Parameters:

keysetAlias: The alias in the SharedPreferences file to store the keyset.

Returns:

This Builder

public EncryptedFile build()

Returns:

An EncryptedFile with the specified parameters.