Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

EncryptedFile.Builder

public static final class EncryptedFile.Builder
extends Object

java.lang.Object
   ↳ androidx.security.crypto.EncryptedFile.Builder


Builder class to configure EncryptedFile

Summary

Public constructors

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

This constructor is deprecated. Use Builder(Context, File, MasterKey, FileEncryptionScheme) instead.

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

Builder for an EncryptedFile.

Public methods

EncryptedFile build()
EncryptedFile.Builder setKeysetAlias(String keysetAlias)
EncryptedFile.Builder setKeysetPrefName(String keysetPrefName)

Inherited methods

Public constructors

Builder

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

This constructor is deprecated.
Use Builder(Context, File, MasterKey, FileEncryptionScheme) instead.

Builder for an EncryptedFile.

Parameters
file File

context Context

masterKeyAlias String

fileEncryptionScheme EncryptedFile.FileEncryptionScheme

Builder

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

Builder for an EncryptedFile.

Parameters
context Context

file File

masterKey MasterKey

fileEncryptionScheme EncryptedFile.FileEncryptionScheme

Public methods

build

public EncryptedFile build ()

Returns
EncryptedFile An EncryptedFile with the specified parameters.

Throws
GeneralSecurityException
IOException

setKeysetAlias

public EncryptedFile.Builder setKeysetAlias (String keysetAlias)

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

Returns
EncryptedFile.Builder This Builder

setKeysetPrefName

public EncryptedFile.Builder setKeysetPrefName (String keysetPrefName)

Parameters
keysetPrefName String: The SharedPreferences file to store the keyset.

Returns
EncryptedFile.Builder This Builder