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:
mskor 2024-12-09 23:54:54 +00:00
parent 2e582b920d
commit a9869ea999

View file

@ -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 {