Omkar Bhikarje CPP
Omkar Bhikarje CPP
PROJECT REPORT
ON
SUBMITTED TO
DIPLOMA IN
COMPUTER ENGINEERING
UNDER GUIDENCE OF
MISS. MESHRAM S.P.
DEPARTMENT of COMPUTER
A.C.S.’S
DIPLOMA IN ENGINEERING AND TECHNOLOGY, ASHTI
(2022-2023)
A.C.S.’S
DIPLOMA IN ENGINEERING AND TECHNOLOGY,
CERTIFICATE
This is to Certify that the project report entitled
“Login and registration”
Submitted by
1. Mr. Bhikaraje Omkar Gorakh 2215020035
2. Mr. Mane Mahesh Prashant 2215020043
3. Mr. Ghanavat Abhay Dnyaneshwar 2215020036
In The Academic Year 2022-2023 In The Partial Fulfilment Of Third Semester Diploma in Computer
Engineering. It Is Certified That All Suggestion Indicated For Internal Assessment Have Been Incorporated In Report. The
Project Has Been Approved As It Satisfies The Academic Requirement In Respect Work Prescribed For The Said Degree
Features:
1. User Registration:
- The program requests the user's first name, last name, email address, and password registration.
- Input validation ensures that the entered information meets certain criteria:
- Email addresses must follow a specific format and cannot start with a number or special character
- Passwords must meet length requirements and include at least one digit, one special character,
one uppercase letter, and one lowercase letter.
2. Verification Code:
- After successful registration, the program generates a verification code and prompts the user to enter it.
- This step simulates an email verification process often used to confirm user identities.
3. User Login:
- The program emphasizes input validation to ensure that user-provided information is accurate
and secure.
- Code organization and modularization have been considered to enhance readability and
maintainability.
- The password complexity check can be further enhanced to enforce stronger security measures.
Usage:
- Users interact with the program through the console, providing input as prompted.
- Successful registration and login messages are displayed upon completion of the respective
processes.
This program provides a foundational structure for a user authentication system and can serve as a
starting point for more advanced implementations with additional features and security measures.
Here is the functions and their working, which are going to use in our program:
2. validfirstname(string firstname) :
3. validlastname(string lastname) :
4. validEmail(string email) :
5. validpassword(string password) :
6. verificationcode() :
7. Login() :
8. main() :
Overall Flow :
- The program starts by welcoming the user and calling `NewRegister()` to handle registration or
login.
- During registration, the program collects user information, validates it, and performs email
verification.
- If the user is not new, the program prompts for login credentials.
- Successful registration or login results in a success message.
Note :
- The code emphasizes input validation to ensure that user-provided information is accurate and
secure.
- Error handling is implemented for potential issues with user input.
- The program simulates an email verification process for educational purposes, and in a real-
world scenario, this would involve external email services.
This program provides a basic foundation for user authentication, and further enhancements can
be made to meet specific application requirements and security standards.
- Implement a mechanism to store user account information persistently, such as in a file or a simple
database.
- Allow the program to retrieve and use this stored information during subsequent runs.
2. Password Hashing:
- Choose a secure hashing algorithm (e.g., SHA-256) and modify the registration and login processes
accordingly.
- Create a simple graphical user interface (GUI) for the program using a C++ GUI library like Qt or
SFML.
4. Multi-User Support :
- Introduce a mechanism to lock user accounts after a certain number of failed login attempts.
- Simulate an actual email sending process by integrating an email sending library (or API) to send
verification codes.
- Explore libraries like SendGrid or use local SMTP servers for testing.
- Strengthen password policies by implementing more advanced rules (e.g., password expiration,
complexity requirements).
- Allow users to manage their profiles, such as updating personal information or changing profile
pictures.
- Implement a profile page where users can view and edit their details.
4. Program
NewRegister();
return 0;
}
void NewRegister() // This function asks the user if he is a new user or have already an account
{
cout << "New register? \n(Note: if you are a new user type Yes, otherwise type No) \n";
cin >> NewRegister; // must be "yes" if he is a new user or "no" if he is not a new user
cin.ignore();
cout << "Password : \n(Note: your password must be at least one digit,one special character, one uppercase letter, and
one lowercase letter) \n"; // enter password
cin >> Password;
while (validpassword(Password) == false)
{
cout << "The password is not valid please try again : " << endl;
cin >> Password;
}
cout << endl
<< "Valid password." << endl
<< endl;
else
return false;
}
bool validEmail(string email) // function to check the validity of the email
{
int AT = -1, dot = -1; // variables to store the position of ( @ )and (dot)
int counterforAT = 0, counterforDot = 0; // check if there is more than one (@) or (dot)
if ((email[0] >= 'a' && email[0] <= 'z') || (email[0] >= 'A' && email[0] <= 'Z')) // if the email address start with
letter(valid )
{
for (int i = 0; i < email.length(); i++)
{
if (email[i] == '@') // If the character is '@'
{
AT = i;
++counterforAT;
}
return false;
return false;
cout << "Note : your password length less than 8 characters or more than 15 characters." << endl;
return false;
}
void verificationcode() // verifying account
{
int code ;
cout << "We have sent a verification code to your email to confirm your account." << endl
<< "Please check your email." << endl;
cin.ignore();
cout << endl << " Log in " << endl<< endl;
cout << "Enter your username :" << endl;
getline(cin, Username);
If you are new, then type Yes for new registration, or type No for Login existing account. In this case we
are going to type for create new account.
Just enter username and password and you’ll get successfully login.
For learners seeking to expand this micro project, numerous avenues for growth
exist. These include implementing persistent user account storage, enhancing
password security through hashing algorithms, introducing graphical user
References
1) Figures are download from www.msbte.com
2) www.google.com
3) www.nationalgeographic.com
4) www.energyeduction.ca
5) For type this project we have use a MS-word
6) And we have complete these project under guidance of Miss. Meshram .S.P.