1 00:00:00,330 --> 00:00:06,940 After this, we'll be measuring how long the encryption and encryption takes place. 2 00:00:07,110 --> 00:00:16,260 So for that, we create your own start time, which is equal to wheels, time, time, method, and 3 00:00:16,260 --> 00:00:16,770 we check. 4 00:00:16,770 --> 00:00:25,350 If my Monastir is equal to encrypt, then what are you supposed to do? 5 00:00:25,650 --> 00:00:29,400 We are using your translator Asgeir. 6 00:00:29,700 --> 00:00:40,650 That's equal to we are using them more 10 not encrypted message is still passing there Mike SDR and 7 00:00:40,650 --> 00:00:53,550 the content SDR as the variables then we have another is if we are checking my mood SDR, if it is equal 8 00:00:53,550 --> 00:00:58,140 to decrypt then what are you supposed to do. 9 00:00:58,470 --> 00:01:03,450 Again here we take translated astar and that is equal to now. 10 00:01:03,450 --> 00:01:21,500 Navios Demo 13 dot decrypt message SDR in brackets we pass my Gastar and again the value of this idea. 11 00:01:22,440 --> 00:01:33,210 Now we will be taking total ThighMaster and that is equal to we are rounding off here the value of time 12 00:01:33,210 --> 00:01:39,750 dot time minus the value of start time that we have already taken. 13 00:01:41,510 --> 00:01:50,210 Round two, after which we gave your friend, come on, this will be over here, even translated, we'll 14 00:01:50,210 --> 00:01:53,600 go there and after this we will give up and come command here. 15 00:01:54,080 --> 00:01:57,110 It wasn't timing. 16 00:01:58,100 --> 00:02:13,310 It wasn't s second safe, wasn't giving my mood estado title coma total time STF. 17 00:02:15,140 --> 00:02:20,010 Now, we would write out a translated message to the output file that we have created. 18 00:02:20,360 --> 00:02:22,700 So here we would take the output. 19 00:02:24,520 --> 00:02:32,080 File now we have taken our output file name is still there, so like we have created the file object 20 00:02:32,080 --> 00:02:32,410 here. 21 00:02:32,710 --> 00:02:40,840 We will also create the output file Obejas DIA and that's equal to first thing is we would open the 22 00:02:41,170 --> 00:02:47,530 output file name Mystere and open this in the right mode. 23 00:02:47,540 --> 00:02:51,370 Hence we have given W because now we want to write something in it. 24 00:02:51,400 --> 00:03:00,220 OK, similarly output file object is still don't use the right method and put the value of translator 25 00:03:00,220 --> 00:03:00,730 into it. 26 00:03:01,240 --> 00:03:05,290 Similarly then say output file object. 27 00:03:05,550 --> 00:03:08,030 Still, don't forget to close it. 28 00:03:08,200 --> 00:03:15,430 So one way we have read it from one file and in the other one we have inserted that encrypted data into 29 00:03:15,430 --> 00:03:16,400 the other five. 30 00:03:17,110 --> 00:03:23,350 Now once we have done this, we will move on to the next print command wherein we are seeing the one 31 00:03:23,820 --> 00:03:29,890 percent assign G percent s in brackets as 32 00:03:32,230 --> 00:03:39,220 characters dot and see in brackets we print. 33 00:03:39,640 --> 00:03:52,720 The value of my immodesty are the input file, Mr comma, the length of your content STF after which 34 00:03:52,720 --> 00:04:05,320 the next print come on we will give is in single code so percent ID file is percent s and we print to 35 00:04:06,130 --> 00:04:06,640 see 36 00:04:10,000 --> 00:04:18,540 my are the title and the output file name STF. 37 00:04:19,930 --> 00:04:22,570 Now once we have given this print, come on. 38 00:04:22,900 --> 00:04:28,570 The last one that we need to do here is in the main field. 39 00:04:28,570 --> 00:04:39,030 We would say if the name is equal to mean and single codes or the main method, fine. 40 00:04:39,310 --> 00:04:42,850 Now let us save this as the more 41 00:04:46,960 --> 00:04:49,600 we are having sixteen done. 42 00:04:49,600 --> 00:04:57,010 So it would be good to see Demel, 17, thought by and let us try it executables. 43 00:04:57,220 --> 00:05:02,660 OK, encrypting and then we got an error translated as not defined. 44 00:05:02,680 --> 00:05:05,680 OK, now this is not translated over here. 45 00:05:06,640 --> 00:05:09,790 You made a mistake that is translated Estie. 46 00:05:10,180 --> 00:05:11,380 So this one. 47 00:05:12,640 --> 00:05:18,570 OK, let's say this again and try to run this will over right. 48 00:05:18,930 --> 00:05:26,530 You could see encrypting encryption time it has taken zero point seventy seven seconds done encrypting 49 00:05:26,530 --> 00:05:31,540 the file and the encrypted file is encrypted. 50 00:05:31,540 --> 00:05:35,400 But now let us check whether this file has been created. 51 00:05:36,430 --> 00:05:43,350 So if we go to over python hacking, no matter where we come in the folder, we have damaged or encrypted 52 00:05:43,360 --> 00:05:44,110 or 60. 53 00:05:44,380 --> 00:05:45,730 If we tried to open up. 54 00:05:45,730 --> 00:05:53,800 See, the whole file that we have is totally encrypted and it is not able to be readable now. 55 00:05:54,190 --> 00:05:54,610 Right. 56 00:05:54,740 --> 00:06:00,070 So if you have to read, you have to again decrypt all file and then you will have to read it. 57 00:06:00,370 --> 00:06:08,980 So in just some seconds, we have decrypted the whole of the file that we have and created another file 58 00:06:08,980 --> 00:06:11,440 that is another file in the same folder. 59 00:06:11,830 --> 00:06:15,010 So now what if you are supposed to decrypt it? 60 00:06:15,910 --> 00:06:20,770 Let us check out in our program that is Demo 17. 61 00:06:21,040 --> 00:06:25,090 Now, the fourth thing is our input file name over here will change. 62 00:06:25,360 --> 00:06:35,460 So now it would be the MODOK encrypted, got the 60, and here we will create a file that is C decrypted, 63 00:06:35,470 --> 00:06:37,930 not the XY output filename. 64 00:06:38,170 --> 00:06:45,040 And here we would give the more now as not encrypted, but Decrypt and others. 65 00:06:45,040 --> 00:06:51,720 Everything we would keep would seem let us save this and let us try to run it again. 66 00:06:52,390 --> 00:06:58,210 So now it is decrypting decryption time taken is more or less than the time which was required earlier 67 00:06:58,450 --> 00:07:02,790 than decrypting the file and now decrypted file is your decrypted. 68 00:07:04,060 --> 00:07:05,980 Let's have a look in our folder. 69 00:07:06,250 --> 00:07:07,810 We have this file created. 70 00:07:07,810 --> 00:07:08,350 Yes. 71 00:07:08,650 --> 00:07:15,180 If we open up, everything looks like normal now it is readable, a normal human readable file. 72 00:07:16,090 --> 00:07:19,630 So in this way, the normal file was encrypted. 73 00:07:19,900 --> 00:07:22,060 The same file was again decrypted. 74 00:07:22,660 --> 00:07:23,480 That's it from the. 75 00:07:23,940 --> 00:07:24,720 Thank you very much.