Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

authentication_exercise

Overview

This 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:
git clone /home/nuno/workspace/authentication_exercise
cd authentication_exercise
  1. Install dependencies:
sudo apt update
sudo apt-get install g++
  1. Build the project:
g++ -o auth_system main.cpp -lssl -lcrypto

Usage

  1. Run the authentication system:
./auth_system
  1. 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

#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;
}

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages