flowchart LR
A[/Timed passowrd generator/] --> B{If}
B --> |Password and timestamp file is present| C[Check date]
B --> |Password and timestamp file is not present| D[Generate a file with a new password and the timestamp]
C --> E{If}
E --> |The date is older than one day| G[Genereate a new password and update the file]
E --> |The date is not older than one day| F[/Return password/]
D --> F
G --> F
"one day" is an example of time, in the class this parameter in editable
- Retrieve the password ->
Public Function Get_password()
From
timed_password_generator.class.asp
- Set class parameters
path_of_file = "" '<-- Set param update_time = 1 '<-- Set param 'Set one of this params 'time_check = "yyyy" '<- Year 'time_check = "q" '<- Quarter 'time_check = "m" '<- Month 'time_check = "y" '<- Day of year time_check = "d" '<- Day 'time_check = "w" '<- Weekday 'time_check = "ww" '<- Week of year 'time_check = "h" '<- Hour 'time_check = "n" '<- Minute 'time_check = "s" '<- Second
From
Test.asp
- Initialize the class
<%@LANGUAGE="VBSCRIPT"%> <!--#include file="timed_password_generator.class.asp"--> <% Dim my_psw Set my_psw = new timed_password_generator
- Retrieve the password
Response.write("<h1> Password of the day: </h1><br>") Response.write(my_psw.Get_password()) %>