DataHandler.Accounts
A barebones local account system
Represents a user account’s stored data.
Properties:
Constructors:
AccountData() { } // For deserialization
AccountData(string username,
PasswordCheckData password,
string dataEncryptionKey,
string recoveryDataKey)
internal SecureData PublicKey
Default key used to encrypt/decrypt the account list JSON.
internal void ChangePublicKey(string NewVal)
Updates PublicKey to a new value (wrapped in SecureData).
Initializes a fresh “Users.json” in the specified directory containing an empty account list.
Parameters:
Returns: Task
Creates a new user entry, storing:
Parameters:
Returns: Task — The recovery key (for password resets).
Exceptions:
Validates credentials and, on success, returns the user’s data-encryption key.
Parameters:
Returns: Task — Decrypted data-encryption key.
Exceptions:
Uses the stored recovery key to re-encrypt a new password and rotation of encryption keys:
Parameters:
Returns: Task — The new data-encryption key.
Exceptions: