EncryptedFileKt

public final class EncryptedFileKt


Summary

Public methods

static final @NonNull EncryptedFile
EncryptedFile(
    @NonNull Context context,
    @NonNull File file,
    @NonNull MasterKey masterKey,
    @NonNull EncryptedFile.FileEncryptionScheme fileEncryptionScheme,
    @Nullable String keysetPrefName,
    @Nullable String keysetAlias
)

Creates an EncryptedFile

Public methods

EncryptedFile

@NonNull
public static final EncryptedFile EncryptedFile(
    @NonNull Context context,
    @NonNull File file,
    @NonNull MasterKey masterKey,
    @NonNull EncryptedFile.FileEncryptionScheme fileEncryptionScheme,
    @Nullable String keysetPrefName,
    @Nullable String keysetAlias
)

Creates an EncryptedFile

Parameters
@NonNull Context context

The context to work with.

@NonNull File file

The backing File.

@NonNull MasterKey masterKey

The MasterKey that should be used.

@NonNull EncryptedFile.FileEncryptionScheme fileEncryptionScheme

The FileEncryptionScheme to use, defaulting to FileEncryptionScheme.AES256_GCM_HKDF_4KB.

@Nullable String keysetPrefName

The SharedPreferences file to store the keyset for this EncryptedFile.

@Nullable String keysetAlias

The alias in the SharedPreferences file to store the keyset for this EncryptedFile.