https://github.com/arnaudband/authentication_exercise
https://github.com/arnaudband/authentication_exercise
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/arnaudband/authentication_exercise
- Owner: ArnaudBand
- License: mit
- Created: 2025-01-03T15:40:22.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-03T16:13:45.000Z (4 months ago)
- Last Synced: 2025-01-23T10:15:12.683Z (3 months ago)
- Language: C++
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# authentication_exercise
## OverviewThis project is an authentication system implemented in C++. It includes functionalities for user registration, login, and password management.
## Features
- User registration with unique username and password
- Secure password storage using hashing
- User login with authentication
- Password reset functionality## Requirements
- C++11 or later
- OpenSSL library for hashing## Setup
1. Clone the repository:
```sh
git clone /home/nuno/workspace/authentication_exercise
cd authentication_exercise
```2. Install dependencies:
```sh
sudo apt update
sudo apt-get install g++
```3. Build the project:
```sh
g++ -o auth_system main.cpp -lssl -lcrypto
```## Usage
1. Run the authentication system:
```sh
./auth_system
```2. Follow the on-screen instructions to register, login, or reset your password.
## Code Structure
- `main.cpp`: Contains the main function and user interaction logic.
- `auth.cpp`: Implements the authentication functionalities.
- `auth.h`: Header file for the authentication functions.## Example
```cpp
#include
#include "auth.h"int main() {
// Example usage of the authentication system
registerUser("username", "password");
if (loginUser("username", "password")) {
std::cout << "Login successful!" << std::endl;
} else {
std::cout << "Login failed!" << std::endl;
}
return 0;
}
```## License
This project is licensed under the MIT License.