PasswordStorage

open class PasswordStorage(encryption: PortalEncryption = PortalEncryption(PortalMobileMpc())) : CloudStorageAdapter

Handles password-based cloud storage operations including encryption, decryption, and validation.

Parameters

encryption

The encryption utility used for securing data. Defaults to PortalEncryption(PortalMobileMpc()).

Constructors

Link copied to clipboard
constructor(encryption: PortalEncryption = PortalEncryption(PortalMobileMpc()))

Properties

Link copied to clipboard
open override var api: Api?
Link copied to clipboard
open override var method: BackupMethods
Link copied to clipboard

Functions

Link copied to clipboard
open override fun decrypt(value: String, key: String): String

Decrypts an encrypted value using the provided password.

Link copied to clipboard
open suspend fun delete(): Boolean
Link copied to clipboard
open override fun encrypt(value: String): EncryptedData

Encrypts a given value using the stored password.

Link copied to clipboard
open suspend override fun read(): String?

Reads the stored password.

Link copied to clipboard
open suspend override fun validateOperations(): Boolean

Validates if password-based operations can be performed.

Link copied to clipboard
open suspend override fun write(content: String): String?

Placeholder function for writing a password-based backup. This function is not actually used and is here just for completeness.