After this, we'll be measuring how long the encryption and encryption takes place.
So for that, we create your own start time, which is equal to wheels, time, time, method, and
we check.
If my Monastir is equal to encrypt, then what are you supposed to do?
We are using your translator Asgeir.
That's equal to we are using them more 10 not encrypted message is still passing there Mike SDR and
the content SDR as the variables then we have another is if we are checking my mood SDR, if it is equal
to decrypt then what are you supposed to do.
Again here we take translated astar and that is equal to now.
Navios Demo 13 dot decrypt message SDR in brackets we pass my Gastar and again the value of this idea.
Now we will be taking total ThighMaster and that is equal to we are rounding off here the value of time
dot time minus the value of start time that we have already taken.
Round two, after which we gave your friend, come on, this will be over here, even translated, we'll
go there and after this we will give up and come command here.
It wasn't timing.
It wasn't s second safe, wasn't giving my mood estado title coma total time STF.
Now, we would write out a translated message to the output file that we have created.
So here we would take the output.
File now we have taken our output file name is still there, so like we have created the file object
here.
We will also create the output file Obejas DIA and that's equal to first thing is we would open the
output file name Mystere and open this in the right mode.
Hence we have given W because now we want to write something in it.
OK, similarly output file object is still don't use the right method and put the value of translator
into it.
Similarly then say output file object.
Still, don't forget to close it.
So one way we have read it from one file and in the other one we have inserted that encrypted data into
the other five.
Now once we have done this, we will move on to the next print command wherein we are seeing the one
percent assign G percent s in brackets as
characters dot and see in brackets we print.
The value of my immodesty are the input file, Mr comma, the length of your content STF after which
the next print come on we will give is in single code so percent ID file is percent s and we print to
see
my are the title and the output file name STF.
Now once we have given this print, come on.
The last one that we need to do here is in the main field.
We would say if the name is equal to mean and single codes or the main method, fine.
Now let us save this as the more
we are having sixteen done.
So it would be good to see Demel, 17, thought by and let us try it executables.
OK, encrypting and then we got an error translated as not defined.
OK, now this is not translated over here.
You made a mistake that is translated Estie.
So this one.
OK, let's say this again and try to run this will over right.
You could see encrypting encryption time it has taken zero point seventy seven seconds done encrypting
the file and the encrypted file is encrypted.
But now let us check whether this file has been created.
So if we go to over python hacking, no matter where we come in the folder, we have damaged or encrypted
or 60.
If we tried to open up.
See, the whole file that we have is totally encrypted and it is not able to be readable now.
Right.
So if you have to read, you have to again decrypt all file and then you will have to read it.
So in just some seconds, we have decrypted the whole of the file that we have and created another file
that is another file in the same folder.
So now what if you are supposed to decrypt it?
Let us check out in our program that is Demo 17.
Now, the fourth thing is our input file name over here will change.
So now it would be the MODOK encrypted, got the 60, and here we will create a file that is C decrypted,
not the XY output filename.
And here we would give the more now as not encrypted, but Decrypt and others.
Everything we would keep would seem let us save this and let us try to run it again.
So now it is decrypting decryption time taken is more or less than the time which was required earlier
than decrypting the file and now decrypted file is your decrypted.
Let's have a look in our folder.
We have this file created.
Yes.
If we open up, everything looks like normal now it is readable, a normal human readable file.
So in this way, the normal file was encrypted.
The same file was again decrypted.
That's it from the.
Thank you very much.