1 00:00:00,510 --> 00:00:08,460 The previous videos we looked at what is encoding encryption, hasheem and hotspring security can leverage 2 00:00:08,460 --> 00:00:09,870 them using a password. 3 00:00:09,880 --> 00:00:17,640 And so I have been saying that password encoded is the responsible intercepting security, which can 4 00:00:17,640 --> 00:00:23,720 be violating the password by leveraging the harshing encryption or encoding, whatever you say to it. 5 00:00:24,270 --> 00:00:25,920 But let's try to look into it. 6 00:00:25,930 --> 00:00:26,640 What exactly? 7 00:00:26,650 --> 00:00:29,080 Percent inside password and a definition. 8 00:00:29,580 --> 00:00:30,630 So when is a password? 9 00:00:30,630 --> 00:00:36,580 And it is an interface available in such security and it has primarily three methods. 10 00:00:37,020 --> 00:00:44,930 One is the very first one which we call letters and code, which acceptor a password from the user to 11 00:00:44,930 --> 00:00:47,090 without using the word encode. 12 00:00:47,100 --> 00:00:51,910 That doesn't mean this applicable only for encoding, but not for encryption. 13 00:00:51,950 --> 00:00:55,410 And so here it took as a general term. 14 00:00:55,410 --> 00:01:02,820 Encoding means converting from one form to another form and thereby using encoding algorithms or encryption 15 00:01:02,820 --> 00:01:04,300 or hash items. 16 00:01:04,650 --> 00:01:08,900 So the purpose of this method is who are implementing this method? 17 00:01:09,270 --> 00:01:15,300 They should accept the real password, which is coming from the framework, and they have to encode 18 00:01:15,300 --> 00:01:17,360 it as part of the requirement. 19 00:01:17,490 --> 00:01:25,200 Suppose things like I use to use some cash, get them to use inside my application so that no one can 20 00:01:25,290 --> 00:01:27,970 ever it or decoded to see the original text. 21 00:01:28,320 --> 00:01:34,920 So this method will be called by spring security framework as soon as it receives a Crenshaw's from 22 00:01:34,920 --> 00:01:42,350 the user and it will try to generate a hash out of it by taking the original text. 23 00:01:42,630 --> 00:01:49,590 So once we have that hashed password, then spring security leverages matches method. 24 00:01:49,620 --> 00:01:57,090 So Matches Matter is the place where our spring security first try to call our encode method by passing 25 00:01:57,090 --> 00:02:05,160 the password and in return it will get the hash value of the text that we received from the user. 26 00:02:05,400 --> 00:02:13,160 And at the same time it also accept another parameter which is encoded password, which we already shared 27 00:02:13,170 --> 00:02:14,210 inside the database. 28 00:02:14,610 --> 00:02:18,840 So it will take both the hash values and try to compare. 29 00:02:19,080 --> 00:02:21,900 If it matches, it will return a boolean. 30 00:02:21,900 --> 00:02:23,520 True, otherwise false. 31 00:02:23,880 --> 00:02:30,380 So based upon this method, framework will decide whether I should authenticate the person or not. 32 00:02:30,660 --> 00:02:35,740 And at last we also have one implementation method, which is a great encoding. 33 00:02:36,120 --> 00:02:38,440 So by default, this return false. 34 00:02:38,820 --> 00:02:45,930 The purpose of this method is suppose you want to make your hashing algorithm or encoding or encryption 35 00:02:45,930 --> 00:02:50,120 algorithm to make it even more complex for the users to decode it. 36 00:02:50,610 --> 00:02:58,170 So that's where you will mention a great encoding as true, which means spring security will try to 37 00:02:58,170 --> 00:03:01,860 do encoding on top of existing encoding. 38 00:03:01,860 --> 00:03:09,180 That means you will be doing that encoding, encryption or hashing two times, which gives you more 39 00:03:09,180 --> 00:03:09,900 security. 40 00:03:10,170 --> 00:03:17,730 But that doesn't mean you should always use this method by ordering it to true, because sometimes trying 41 00:03:17,730 --> 00:03:25,350 to encoding the same string multiple times will slow down your process because hashing encryption, 42 00:03:25,620 --> 00:03:29,870 they all took some good amount of time and processing time. 43 00:03:30,120 --> 00:03:36,150 So that's where if you're trying to make it even more complex, so then you should be in a position 44 00:03:36,540 --> 00:03:43,080 where you don't have any issues that taking more time compared to what you essentially have for a single 45 00:03:43,080 --> 00:03:43,560 encoding. 46 00:03:44,280 --> 00:03:47,820 So this is a sample interface provided by spring security. 47 00:03:48,360 --> 00:03:55,590 And at the same time, spring security also provides different flavors of passwords and codes that we 48 00:03:55,590 --> 00:03:59,690 can leverage inside our application based upon our requirements. 49 00:04:00,120 --> 00:04:05,520 You're always free to go and implement this password in order, and you can build your own logic. 50 00:04:05,520 --> 00:04:12,330 Inside this code matches Materne as part of our algorithms as per application requirements. 51 00:04:12,630 --> 00:04:21,029 But to help you to get started, we have five different password encoders provided by spring security, 52 00:04:21,269 --> 00:04:28,410 which is no password encoded, which we already using previously, and next to standard password and 53 00:04:28,410 --> 00:04:34,940 encoder, followed by Ebiquity to Password Encoder Biggera Password and and password. 54 00:04:34,950 --> 00:04:42,450 And I would say most of the application there should be good if they can leverage this existing password 55 00:04:42,450 --> 00:04:44,490 encoders that's being security code. 56 00:04:44,850 --> 00:04:52,410 The reason is they are already following enough algorithms on security measures that no one can decode 57 00:04:52,410 --> 00:04:53,550 your password. 58 00:04:53,940 --> 00:04:59,760 And you can see most of our industry applications, they are using Bakry password encoded, which is 59 00:04:59,760 --> 00:04:59,850 the. 60 00:04:59,910 --> 00:05:05,820 Famous one in the industry, that's where will do some hands on with the secret password encoded in 61 00:05:05,820 --> 00:05:06,640 the coming videos. 62 00:05:07,410 --> 00:05:11,130 So now we have a basic understanding of what is password encoded. 63 00:05:11,550 --> 00:05:19,470 Let's try to deepti each of these password encoders and try to do some handson with the password encoded 64 00:05:19,500 --> 00:05:20,550 in the coming videos. 65 00:05:20,580 --> 00:05:21,150 Thank you. 66 00:05:21,180 --> 00:05:21,690 And by.