|
Message-ID: <CABtNtWHV+TEznc3eXVMeZsLZ0mraXBVNxNUzVJQ=2AnZhUcubg@mail.gmail.com> Date: Fri, 14 Aug 2015 21:52:00 +0800 From: Kai Zhao <loverszhao@...il.com> To: john-dev@...ts.openwall.com Subject: Re: auditing our use of FMT_* flags (was: more robustness) Hi Alexander, On Fri, Aug 14, 2015 at 9:43 PM, Solar Designer <solar@...nwall.com> wrote: > On Fri, Aug 14, 2015 at 09:12:51PM +0800, Kai Zhao wrote: >> Are the comments ok ? >> >> static struct fmt_tests tests[] = { >> +/* >> + * The following two test vectors: "USER" and "service" are case-insensitive >> + */ >> {"$V$9AYXUd5LfDy-aj48Vj54P-----", "USER"}, >> {"$V$p1UQjRZKulr-Z25g5lJ-------", "service"}, >> +/* >> + * The following one test vectors: "President#44" is case-sensitive, so this >> + * format should set FMT_CASE >> + */ >> {"$V$S44zI913bBx-UJrcFSC------D", "President#44"}, >> {NULL} >> }; > > Mostly yes, but the setting of FMT_CASE isn't because of the test > vectors - it is because the format in fact supports case-sensitive > passwords with some of its supported hashes. Even if we omitted that > one test vector, we would still need to set FMT_CASE. As such, the > comment is slightly misleading. So I think you need 3 separate > comments (with only two of them being about the test vectors), not two. > Also, s/one test vectors/one test vector/ > Thanks for your advice. How about this ? static struct fmt_tests tests[] = { +/* + * The following two test vectors: "USER" and "service" are case-insensitive + */ {"$V$9AYXUd5LfDy-aj48Vj54P-----", "USER"}, {"$V$p1UQjRZKulr-Z25g5lJ-------", "service"}, +/* + * The following one test vector: "President#44" is case-sensitive + */ {"$V$S44zI913bBx-UJrcFSC------D", "President#44"}, {NULL} +/* + * This format supports both case-sensitive and case-insensitive passwords, + * so this format should set FMT_CASE + */ }; Thanks, Kai
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.