This project is an authentication system implemented in C++. It includes functionalities for user registration, login, and password management.
- User registration with unique username and password
- Secure password storage using hashing
- User login with authentication
- Password reset functionality
- C++11 or later
- OpenSSL library for hashing
- Clone the repository:
git clone /home/nuno/workspace/authentication_exercise
cd authentication_exercise- Install dependencies:
sudo apt update
sudo apt-get install g++- Build the project:
g++ -o auth_system main.cpp -lssl -lcrypto- Run the authentication system:
./auth_system- Follow the on-screen instructions to register, login, or reset your password.
main.cpp: Contains the main function and user interaction logic.auth.cpp: Implements the authentication functionalities.auth.h: Header file for the authentication functions.
#include <iostream>
#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;
}This project is licensed under the MIT License.