1 00:00:00,460 --> 00:00:06,640 So now we will all move on with the extreme examples of where we're safer over here. 2 00:00:06,670 --> 00:00:08,790 First thing is we will go for a new fire. 3 00:00:09,190 --> 00:00:13,890 And let's right down here start with see a message. 4 00:00:14,350 --> 00:00:24,990 Now, here we have input from the user saying, see, what would you like to do? 5 00:00:25,420 --> 00:00:26,340 Questionmark, Mark. 6 00:00:27,010 --> 00:00:32,340 And for a new line here, we put the text first, encrypt all on the new lines. 7 00:00:32,380 --> 00:00:33,950 We put the text decrypt. 8 00:00:34,360 --> 00:00:37,930 That is when asking the user what the user is willing to do. 9 00:00:37,930 --> 00:00:41,390 Either he wants to encrypt the text or he wants to decrypt text. 10 00:00:41,440 --> 00:00:52,570 OK, then we say here, if the message variable is equal to encrypt, OK, then we would see print in 11 00:00:52,570 --> 00:01:06,400 bracket, see your message will be encrypted and then you ask for the user on message, like again putting 12 00:01:06,400 --> 00:01:11,650 an input same into your message here. 13 00:01:12,040 --> 00:01:18,520 OK, then you take a variable, say X one and that is equal to you. 14 00:01:18,550 --> 00:01:20,140 Put the value of message there. 15 00:01:20,650 --> 00:01:31,630 Then we take another variable C translated equal to open close single code which is equal to the length 16 00:01:31,630 --> 00:01:38,640 of Macit, the variable message minus one. 17 00:01:39,310 --> 00:01:44,300 Then we run of a loop I is less than equal to zero. 18 00:01:44,620 --> 00:01:58,090 We open the loop, we see the variable translated is equal to translated plus message I then we say 19 00:01:58,090 --> 00:02:02,170 I will do I minus one and. 20 00:02:03,180 --> 00:02:07,050 We just go back one and we put here the value of. 21 00:02:09,250 --> 00:02:16,550 Translated, then we put the code for decrypting in this code, basically that we have given is for 22 00:02:16,600 --> 00:02:17,680 encrypting, right? 23 00:02:18,040 --> 00:02:21,120 So we go back and now we go for else. 24 00:02:21,160 --> 00:02:29,710 If but and here we check if the user have entered initially the value not encrypted, but decrypt. 25 00:02:29,950 --> 00:02:33,970 OK, then in that case, we are asking the printing the value. 26 00:02:33,970 --> 00:02:35,230 See your. 27 00:02:36,390 --> 00:02:49,780 Message will be decrypted again here, also, let's give off and OK, and then we use another variable 28 00:02:50,080 --> 00:02:54,240 message, too, that's equal to V again, give your input. 29 00:02:54,690 --> 00:02:56,430 We say enter the. 30 00:02:59,780 --> 00:03:10,700 Encrypted message, OK, which you want basically to decrypt, OK, then we take Wyvern, that's equal 31 00:03:10,700 --> 00:03:12,240 to the same message, too. 32 00:03:12,800 --> 00:03:13,970 And again. 33 00:03:15,350 --> 00:03:22,940 C translated variable, which is initially blank, we say is equal to use the land function, but this 34 00:03:22,940 --> 00:03:25,220 time for message two minus one. 35 00:03:25,880 --> 00:03:34,250 And again here we say while I more than equal to zero, there is no need for a bracket is 36 00:03:37,040 --> 00:03:38,920 more than equal to zero. 37 00:03:39,560 --> 00:03:51,600 Calling your report translated is equal to translated plus the value of message to at the index. 38 00:03:52,580 --> 00:03:55,640 Then we say I was two again, I'm minus one. 39 00:03:56,180 --> 00:04:01,400 And after which we put in the value of translated variable. 40 00:04:01,580 --> 00:04:10,290 OK, so let us force to see this and we save it in python hacking beginner names at Demo 2.5. 41 00:04:10,880 --> 00:04:15,560 OK, and if we want to run this, we just go to run and see run module. 42 00:04:16,580 --> 00:04:20,100 OK, here we are checking for equality. 43 00:04:20,870 --> 00:04:25,120 So it has to be double equal to OK, so it asks for the text. 44 00:04:25,160 --> 00:04:28,640 Now we say here, right, don't encrypt, OK? 45 00:04:29,010 --> 00:04:30,460 It'll ask for a message. 46 00:04:30,500 --> 00:04:33,920 We see this is Biton 47 00:04:36,620 --> 00:04:38,620 reverse Saiful. 48 00:04:39,110 --> 00:04:42,290 It goes on and on total revulsion again. 49 00:04:42,300 --> 00:04:44,180 Suppose you want to execute it. 50 00:04:44,600 --> 00:04:53,840 So we go back here we again run this module and this time we put it that we want to be it OK and now 51 00:04:53,840 --> 00:05:01,270 we just copy it on the text that we have already encrypted and we get it in the decrypted format. 52 00:05:01,730 --> 00:05:02,020 Right. 53 00:05:02,180 --> 00:05:06,980 So in this way, another example where we're asking our user, what is he wishing to do? 54 00:05:07,220 --> 00:05:13,880 Depending on the user input that he has given, we either execute the value for encryption or we execute 55 00:05:13,880 --> 00:05:20,780 the value for decryption by taking the message also from the user and then encrypting it or decrypting 56 00:05:20,780 --> 00:05:20,930 it. 57 00:05:21,830 --> 00:05:24,120 Now, let's see another example. 58 00:05:24,140 --> 00:05:28,190 So we will close this and let's go for a new file. 59 00:05:28,730 --> 00:05:39,170 And we would create we would first define C encrypt message here. 60 00:05:39,230 --> 00:05:46,950 We will take the parameter C SDR and some key value for Saiki one, for example. 61 00:05:47,510 --> 00:05:57,740 OK, now here we are going to use C encrypt string as a variable that's equal to just a black one. 62 00:05:57,750 --> 00:05:58,730 No value for it. 63 00:05:59,150 --> 00:06:07,400 We run a for loop for I n c SDR and we hope the for loop here. 64 00:06:07,400 --> 00:06:13,730 We check in the if now you know what is this awadi function used for finding the Unicode character for 65 00:06:13,730 --> 00:06:14,820 a particular variable. 66 00:06:15,080 --> 00:06:16,760 So here we are finding it for I. 67 00:06:17,150 --> 00:06:26,930 OK, if that is more than equal to sixty five and we give already for I if that is less than equal to 68 00:06:27,080 --> 00:06:36,700 90, if this condition satisfies then we have there another time is our variable which is equal to VSC 69 00:06:36,900 --> 00:06:39,590 already at the index ie. 70 00:06:39,860 --> 00:06:44,300 Plus the key value that you have given that is key one. 71 00:06:44,850 --> 00:06:57,800 OK, after this we check here if say the temp estie are OK, if that is more than 90 then we take them 72 00:06:57,980 --> 00:07:00,950 as our equals to sit them. 73 00:07:01,070 --> 00:07:07,550 S.T. are for synch C 90 plus we make it sixty four. 74 00:07:08,440 --> 00:07:15,230 OK, so if it is in a similar case, make it to upper uppercase, make it smaller then we can one back 75 00:07:15,230 --> 00:07:23,420 and here we see the variable n c string that we have taken that is equal to c e n c strength. 76 00:07:23,840 --> 00:07:29,820 Plus use this feature for your temp SDR. 77 00:07:30,200 --> 00:07:40,670 OK then we go on for one more back and we go here for his if and here we check if it is already at the 78 00:07:40,670 --> 00:07:51,140 index I if that's more than ninety seven and you are already at the index, I again we open the brackets 79 00:07:51,140 --> 00:07:51,440 here. 80 00:07:51,920 --> 00:08:00,410 If that is less than equal to say one twenty two then you will again see here say temp SDR is equal 81 00:08:00,410 --> 00:08:10,400 to we use Awadi and the index I plus the value of forty one and we check if your temp SDR is more than 82 00:08:10,400 --> 00:08:24,110 one twenty two, calling your retake temp tempesta are equal to temp SDR plus one twenty two plus ninety 83 00:08:24,110 --> 00:08:24,590 six. 84 00:08:25,250 --> 00:08:36,740 And then we say the ANC string variable is equal to IANSA string plus convert to character of Demoustier. 85 00:08:37,070 --> 00:08:44,300 OK, now after this we move on here and go for the spot, which means none of the above conditions are 86 00:08:44,300 --> 00:08:44,720 true. 87 00:08:44,840 --> 00:08:54,410 Then we see in the string is equal to IANSA string plus the character value of already at the index. 88 00:08:54,680 --> 00:08:56,840 I lost the key value. 89 00:08:57,620 --> 00:09:01,910 OK, now after we have done this, we have to simply say. 90 00:09:03,350 --> 00:09:06,560 Written in C string value.