https://bugzilla.wikimedia.org/show_bug.cgi?id=28419
--- Comment #38 from Daniel Friesen <mediawiki-b...@nadir-seen-fire.com> 2012-03-31 08:17:51 UTC --- (In reply to comment #37) > OK, now I understand the logic. In that case I'll give my support FWIW. The > only thing I would recommend is cleanup the structure a little bit. There's no > need for a PasswordType interface when there's a base abstract class that's > already required to be inherited by the primary Password class. The separation between PasswordType and BasePasswordType (I think I used to call it AbstractPasswordType or CommonPasswordType, should I rename it back?) is what allows the flexible implementation of things like crypt(3). An implementation that uses our : pattern extends BasePasswordType and lets BasePasswordType abstract away all the storage, crypt, and comparison bits. While an implementation that needs to call a 3rd party library or say crypt(3) with raw data instead implements PasswordType directly and uses the raw data to handle crypt and compare itself. I don't believe I referenced BasePasswordType anywhere but in the extends. All instanceof checks should be against the PasswordType interface. Though I do think I could turn the PasswordType interface into an abstract class so that isPreferredFormat can have the same `require true;` default as BasePasswordClass. > Also, I would change the cryptParams() function to defaultCryptParams() and > replace preferred format with current format. Hmmm... 'default' might work. At the same time they don't feel like 'default'. It's more of a callback saying "I'm hashing a password for the first time, please create the parameters to run the algorithm with." Using 'default' makes it sound a little static when it's not, since cryptParams() returns things like completely random salts. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l