Date: Sat, 16 Jun 2012 17:45:46 +0200 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: Re: [patch] optional new raw sha1 implemetation On 2012-06-16 15:38, jfoug wrote: >> For memrchr, my man page says to define _GNU_SOURCE before including >> string.h but that did not help. After looking at the header I define >> __USE_GNU instead, and undef it after including string.h. Not sure >> what's up with that? > > That will not be portable. Not all builds are gcc. Since this is in a > non-hot area, we simply should scan backwards with a char pointer, and set > it when we find it. Or simply keep the length, or scan forward. Or we > could memset the buffer, make it large enough (17 chars at least), then > simply scan from tail, and know when we get to the 80, that we are chopping > off the right one. I now replaced it with strrchr() as it's working on a string anyway. I also added the $dynamic_12$ tag other raw SHA1 formats use. And the format announced FMT_SPLIT_UNIFIES_CASE which was not correct until now. magnum
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.