Hello.
Today's lesson is on Keegan templates.
As you recall in an earlier lesson we have done safety again.
And also we talked about a little bit on Eastern occasion and I did mention that in order to create
an external keychain you need to first learn the assembly language programming so to have you create
an external occasion.
I have created a template it is called Occasion template
so go and download this file.
0 8 keychain template is it from the resource section and put it in your face in projects folder thereafter
and zip it.
And then you may delete the zip file
then open a new 0 8 keychain template folder any reading it he will find a new file called keychain
template here's him.
So this is the basic template that you can use to write your own key again.
So let's open it
and you have all the basic parts of the kitchen that is first compile and run it so clean and run compile
and then copy this stuff you are going to go to this folder
opening command from ICD space and right click based upon the presenter and time desire to check the
contents of this territory and you should have a file Keegan template see if you have a computer.
Now let's run this
time key Preston Preston again PRESENTER Here we ask you for a first name but you can type anything.
ABC the ABC
and the presenter and in January's series key for you taking the first four characters of your name
and then putting a dash in within the year.
Another day followed by the month four for April and then a day and nine for the date.
So this is a sample of a key January's creates a series key based on your name and a date.
Let's take a look how he works.
So here you have a maximum plus size for your name.
I put four.
So this is the trick.
If you want to just a string the first four characters of the name you put four here if you wanted a
straight more more characters you just increase in number accordingly.
And then here is your problem for the user to enter the first name.
So this you bring the problem present the first name and this is the Sierra key scene and the format
specified.
So the first percentage as it refers to the name.
They have a dash for by presentation D for a year followed by a dash 0 here followed by another percentage.
This time for the month for followed by a dash and followed by the date which is Dash and it and oh
here we have the Declaration on the numbers use for the Windows API in the get standard handle function
and redefine function here.
Had a history to store the name in the user enters and we also have a system.
Times did a structure and we created a variable other than did such a system.
Since time it is tiny time on time and then over here we have to get standard handle API to get a input
handle and it is required because refining is to use the input handle to read from the command line.
And then we hear the from the user using a push the string to the state and the name and first name
which is this free.
And this becomes the barometer for if and then after printing the prompt turned his name he will reach
the user input into input string using the refine function.
So input string will contain the name of the user and then hear the get local time to save it in the
system.
So this we know a power function.
So now this time contains the members for the here time and so on and over here a string year and 2.
He s he also copied the man and put it in PBX and copy the D and put it in use case now.
Oh this can be replaced.
So if you are going to write your own kitchen then you replace this is your own code.
You may also need to replace this line change these numbers.
Depending on the algorithm some program might be more than four characters name.
So if you're unsure in my experiment it will be.
So how do you know why no.
Here you have to examine your trainee.
So in creamy 14
if you put a name check it is the patch itself.
Again we need clear.
So from the circle yes you can see that even though you put a motive for characters as a name you only
risk a voice for characters.
So by analyzing the savaging you will know why no one here for me is you are the first four characters
and as you can see the search engine has got one dash so you may need to modify to remove the idea idea
necessarily dash here.
However DFT Jen also shows you that this is not just did some some operation has been performed on the
date
so we may need to study the algorithm
so over here whenever you need a.
So depend on your algorithm.
So this party needs to change here as well as this plus
another part you may need to change these who are here
so the type of string 0 0 q that is produced would be different for every software.
So in this case we are just printing combining the year month and day.
So we are pushing e e x EBIT and see X is yes to the stack and then use printer to clean up a zero key.
So if you do use this for my specify a silky which is this for specify pacifier and we did it.
Here we substitute s DDD with these values input string.
Yes.
And is here so interesting to replace your percentage has
and yes who replace the first T X replace.
Secondly and finding the last D who will be replaced is X..
So in the end you will get you will get this string and yeah I think am I need to change keys here is
value in this example the multiply phone time is five but if you have a different number pushes you
need to count.
So here you have five pushes one two three four five five parameters so you multiply that five if you
will have six parameters then you must multiply six.
So this is not a place you need to change.
So you need to study the assembly for this program and then just from there you understand the algorithm
first and then only you can write your own code by replacing the necessary parts here here here as well
as here and here.
All right.
And yeah I said in times you may need to do more than just these few of us.
So in this lesson I will show you how to use this template to Ray Keegan for this company.
So thank you for watching.
See you on the next line.