Defensive design section 6 Flashcards
What is defensive design
1) anticipate how uses might misuse the program
2) ensure code is maintain
3) reduce the number of errors in code
input sanitation
removing any unwanted characters before passing through the data
input validation
checking if data meets certain criteria before passing data
range check
data is within specific range
presence check
checks data has actually been entered
check digit
numerical data has been entered accurately
Format check
data has correct format
look up table
checks data values against acceptable values
length check
correct length
Authentication
confirm the identity of a user before they’re allowed to access certain places
ways to increase security
1) force users to use strong passwords
2) limit the number of failed authentication
3) ask for random selection of characer
what is a well maintained programe
makes it easy for other programmers to understand what the code does
comments
are useful for explaining what the key features of a program do
indentation
can be used to seperate different statements in the program
variables
should be named so that refer to what they actually do