Added comment to explain that pre-processing is basically cheating and that trees are a good answer here, could have done some weird hashing thing since lookup is instant, but since some of the common passwords can be similar, its riskier and for password handling risk is a BAD BAD BAD idea
This commit is contained in:
parent
2e582b920d
commit
a9869ea999
1 changed files with 3 additions and 1 deletions
|
@ -4,7 +4,9 @@ namespace back_end.Services;
|
|||
|
||||
public class PasswordService : IPasswordService
|
||||
{
|
||||
|
||||
// Since we can do pre-processing on startup, sticking the common passwords into a tree should cut the search time
|
||||
// down by a lot, no more searching through 6456 common passwords before getting to 'password123!'!
|
||||
// After the first step we go down to about 150 possible passwords which will more or less be instant after that!
|
||||
|
||||
private class PasswordTreeNode {
|
||||
|
||||
|
|
Loading…
Reference in a new issue