Login-Systems

The repository contains some different types of simple login systems programmed in c/c++ language. From a very simple password checking program to an advanced encryption system.

View on GitHub

The repository contains some different types of simple login systems programmed in c/c++ language. A new programmer could learn a lot by exploring this repository. All of the programs are written by Rejwan Islam Rizvy.

Preview

Code lines comparison

Version Number Lines Language
Version-01 33 C
Version-02 64 C
Version-03 88 C
Version-04 104 C++
Version-05 187 C++
Version-06 254 C++
Version-07 309 C++

Version Descriptions

You’ll find these versions in the following repository.

Version 01

It is the simplest program. It doesn’t care about username and it can only check the hardcoded password "qwerty99".

Version 02

It is similar to version 01. But it can recursively check the hardcoded password "qwerty99".

Version 03

This version supports multiple users with different passwords. (+holds previous functionality)

Version 04

This version can read login information from normal text file. (+holds previous functionality)

Version 05

Registration system starts from here. It can write registration info into the same normal text file it reads to get the login info. This version can dynamically increase the user informations. (+holds previous functionality)

Version 06

This is just an extension to the version 05. After a successful login, it shows user information on the screen. At the same time it shows some content written in content.txt. So, after a sucessful login someone can see the information. (+holds previous functionality)

Version 07 - Encryption

This version finally uses the encryption system. While registering user info in the database file, it stores an randomly generated key for each user. After that, it writes the encrypted version of the given password with that key. Now, during the login process it checks the password after decrypting it. (+holds previous functionality)

    // generating random encrption key
    srand(time(0));
    int key = 1 + (rand() % 100); // random value from 1 to 100
    
    encrypt(person.password, key);

    log << person.password << ",";
    log << key << endl;