This repository contains a simple account database system implemented in C#. It allows for registering accounts, saving them to a JSON file, loading them back, and retrieving accounts by credentials. It also supports generating XML representation of accounts.
- Registration: Register new accounts with unique usernames and hashed passwords.
- Persistence: Save accounts to a JSON file (
users.json
) and load them back. - Credential Verification: Verify account credentials (username and password).
- XML Export: Generate XML representation of registered accounts.
To use the AccountsStorage
class:
- Create an instance of
AccountsStorage
with a storage file name. - Register new accounts using the
Register
method. - Save registered accounts to file using
SaveToFile
. - Load accounts from file using
LoadFromFile
. - Retrieve account details by credentials using
GetAccountByCredentials
. - Generate XML representation of accounts using
GetAsXml
.
Example usage is provided in Program.cs
.
This project is licensed under the MIT License - see the LICENSE file for details.