Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Authentication System Pseudocode

Authentication System Pseudocode :



initialize i to 3 // for the number of tries user gets

while i> 0

input username and password

convert entered password to the md5 code

open users file

if username entered does exists then

return password from the file

if returned password matches exactly with the md5 of user entered password then

login successful

call authorization(username)

return is true

else

print error message login failed password incorrect

decrease i by 1

else

print error message Invalid Username or Password

decrease i by 1

if i is equal to 0 then

print error message max tries exceeded

return false

authorization(username)

open credential file

fetch the role for the given username

print it on the screen

close the file

main

call authentication and store the return value in login variable

if login is true then

show logout option

else

show login and exit options

 
"Looking for a Similar Assignment? Order now and Get 10% Discount! Use Code "Newclient"