Computer Security Password Policy.

Slides:



Advertisements
Similar presentations
CATHERINE AND ANNIE Python: Part 3. Intro to Loops Do you remember in Alice when you could use a loop to make a character perform an action multiple times?
Advertisements

Write a program step by step. Step 1: Problem definition. Given the coordinate of two points in 2-D space, compute and print their straight distance.
Sort the given string, without using string handling functions.
Pennsylvania’s Protection From Abuse Database
- SEARCHING - SORTING.  Given:  The array  The search target: the array element value we are looking for  Algorithm:  Start with the initial array.
C - Input & Output When we are saying Input that means to feed some data into program. This can be given in the form of file or from command line. C programming.
Basic Input - Output. Output functions  printf() – is a library function that displays information on-screen. The statement can display a simple text.
Chapter 5: Data Input and Output Department of Computer Science Foundation Year Program Umm Alqura University, Makkah Computer Programming Skills
Recursion Examples Fundamentals of CS Case 1: Code /* Recursion: Case 1 */ #include void count (int index); main () { count (0); getchar(); } void count.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
CNG 140 C Programming (Lecture set 9) Spring Chapter 9 Character Strings.
Reading the data from the input devices and displaying the results on the screen are the two main tasks of any program. To perform these tasks user friendly.
Mastering Char to ASCII AND DOING MORE RELATED STRING MANIPULATION Why VB.Net ?  The Language resembles Pseudocode - good for teaching and learning fundamentals.
Agenda Exam #1 Review Modulus Conditionals Boolean Algebra Reading: Chapter Homework #5.
How to start Visual Studio 2008 or 2010 (command-line program)
Implementation of the Hangman Game in C++
NA2204.1jcmt CSE 1320 Intermediate Programming C Program Basics Structure of a program and a function type name (parameters) { /* declarations */ statement;
CECS 121 Test 1. Functions allow you to group program statements under one name C and C++ are case-sensitive so main(), MAIN(), and Main() are all different.
CS140: Intro to CS An Overview of Programming in C (part 3) by Erin Chambers.
CS140: Intro to CS An Overview of Programming in C by Erin Chambers.
More about Strings. String Formatting  So far we have used comma separators to print messages  This is fine until our messages become quite complex:
Changing Your Password General Lesson 3. Objectives Following completion of this lesson you will be able to:. Define how often a password must be changed.
Computer Programming Control Structure
Strings program. C Program to Check if a given String is Palindrome #include void main() { char string[25], reverse_string[25] = {'\0'}; int i, length.
Introduction Chapter 1 1/22/16. Check zyBooks Completion Click on the boxes for each section.
Computer Programming A simple example /* HelloWorld: A simple C program */ #include int main (void) { printf (“Hello world!\n”); return.
DCT1063 Programming 2 CHAPTER 3 STRINGS Mohd Nazri Bin Ibrahim Faculty of Computer, Media & Technology TATi University College
BASIC C PROGRAMMING LANGUAGE TUTORIAL infobizzs.com.
PYTHON PROGRAMMING Year 9. Objective and Outcome Teaching Objective Today we will look at conditional statements in order to understand how programs can.
Prof: Dr. Shu-Ching Chen TA: Samira Pouyanfar Spring 2017
C Interview Questions Prepared By:.
INC 161 , CPE 100 Computer Programming
Review C Programming Language
Decisions Chapter 4.
Lecture 8 String 1. Concept of strings String and pointers
ECE Application Programming
C Programming Tutorial – Part I
Quiz 11/15/16 – C functions, arrays and strings
A First Book of ANSI C Fourth Edition
Pointers.
Psuedo Code.
Arrays in C.
Visit for more Learning Resources
Formatted and Unformatted Input/Output Functions
TOPIC 4: REPETITION CONTROL STRUCTURE
Registering on the SITE is a MULTI-STEP process:
Structured Programming (Top Down Step Refinement)
I/O in C Lecture 6 Winter Quarter Engineering H192 Winter 2005
Use proper case (ie Caps for the beginnings of words)
INC 161 , CPE 100 Computer Programming
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Java Language Basics.
Chapter 8 The Loops By: Mr. Baha Hanene.
Software Security Lesson Introduction
C Characters and Strings – Review Lab assignments
Higher Computing Using Loops.
4.1 Strings ASCII & Processing Strings with the Functions
Command Line Parameters
Govt. Polytechnic,Dhangar
Programming We have seen various examples of programming languages
C Programming Getting started Variables Basic C operators Conditionals
String manipulation string.h library
Introduction to Computer Organization & Systems
Character Arrays char string1[] = “first”;
Characters and Strings Functions
Course Outcomes of Programming In C (PIC) (17212, C203):
C Characters and Strings
Switch Case Structures
Getting Started With Coding
Presentation transcript:

Computer Security Password Policy

Recommendations Easy to be remembered Difficult to guess Sufficient length Not shown on the screen Renewable Use strong password The following is a simple program in c that ask user to enter password and match it.

Password Code in C language #include <stdio.h> #include <string.h> #include <conio.h> int main() //main function { char buffer[12] = {0}; char password[] = "password"; char c; int pos = 0; printf("%s", "Enter password: "); Including C libraries Defining empty buffer Defining password variable Defining character variable Defining index for array Printing a text on screen

Password Code in C language(cont) do { // a loop for interring the password c = getch(); // getch inputs invisible character if( isprint(c) ) { // tests if character is printable buffer[ pos++ ] = c; //put the character in the buffer //after incrementing the index by 1 printf("%c", '*');} //print (*) in the place of character else if( pos==12){ buffer[ pos-- ] = '\0'; } } while( c != 13 ); //13 is the Unicode number of “Enter” Not to go outside the buffer

Password Code in C language(cont) if( !strcmp(buffer, password) ) //checking whether //password is correct printf("\n%s\n", "Logged on succesfully!"); else printf("\n%s\n", "Incorrect login!"); C=getchar(); Clrscr(); return 0; } Screen messages

End