Showing posts from August, 2016

Providing Username and Password to your application in C++

Ever wanted to provide a Username and Password to the application that you've created so that not everyone could run the program? If YES ! Then your wait is over! In this post you'll get know how to do just that :) STEP #1 : Creating the File  Create a text file (let's say  unp.txt ) Type the Username in first line and password in next line. save the file. STEP #2 : The Code! Create a class (let's say Mechanisms ) with one method for getting the input from user for username and password (and) another method for comparing the user inputs with the username and password in the file. Here's the code for the Mechanisms class. class Mechanisms { char username[100]; char password[100]; char access_name[100]; char access_word[100]; int input; int index; public: Mechanisms() { strcpy_s(username, "NoData"); strcpy_s(p

Creating a Password generator application using C++

Well, this is my very first application that I've done in C++. The ideas of this application sprouted when I was answering this question (click to see) in one of the Stack exchange sites called code review. This post consists of the source code for a password-generating application. Here are some of the features of the application: You can either generate a classic or custom password  A Classic password  is a password generated from predefined characters A-Z, a-z, 0-9 and the symbols  (space) ! # $ % & ' ( ) * + , - . / \ " : ; < = > ? @ [ ] ^ _ ` { | } ~. These passwords are not accepted by all websites but only a few. A Custom password is a password generated from the characters that you input! Just mention all the characters accepted by the website and you'll have your password generated. You can Bookmark the generated passwords if you like them and look at them anytime you want! This application is not in anyway ingenious. Thi