Open adras opened 3 years ago
You're welcome to make a PR that gives proper feedback from the password code all the way in the external code without an exception. It's a pretty major refactor to do it.
Exceptions were used because for most use cases, it is exceptional. Brute forcing a password isn't a use case I envisioned for this.
Thanks for your reply. I was actually looking into that yesterday, but I gave up after 5 minutes because I wasn't able to compile the solution. I'm not blaming anyone, but solutions that work out of the box are getting rarer and rarer nowadays :( It seems like it's an art nobody cares about anymore
Throwing and catching of exceptions is extremely slow. Therefore one of the rules in programming is to not use exception for flow control.
It'd be great if there's a proper return value to check indicating whether it was extracted or not and the reasons for that.
For instance: entry.WriteToDictionary returns void, it could however return something like: Class ExtractionResult { bool success; ExtractionErrors error }
enum ExtractionErrors { InvalidPassword, NotEnoughDiskspace NoPermissions etc.... }
Why I care? To be honest, I'm trying to bruteforce the password of a zip file. Where my password generator is able to get to "aaaaaa" in 2 seconds, it ends up at "nx" after 30 seconds because the exception handling is so slow.