[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9A043F3CF02CD34C8E74AC1594475C73F4B2227B@uxcn10-5.UoA.auckland.ac.nz>
Date: Wed, 30 Sep 2015 01:59:38 +0000
From: Peter Gutmann <pgut001@...auckland.ac.nz>
To: "discussions@...sword-hashing.net" <discussions@...sword-hashing.net>
Subject: RE: [PHC] Specification of a modular crypt format (2)
Jean-Philippe Aumasson <jeanphilippe.aumasson@...il.com> writes:
>@Thomas: let's copy the updated source code on a new shared doc https://docs.google.com/document/d/13bv-3HarFpQOD1PayJ2hMvRtVIs5QPu1FZ5XonEv57c/edit?usp=sharing ?
I've waited awhile after seeing this but I'm still just getting a blank page,
is there supposed to be content there? I was curious to compare the final
version with my code, which is (in part):
/* Process the numeric string */
for( value = 0, i = 0; i < strLen; i++ )
{
const int valTmp = value * 10;
const int ch = byteToInt( str[ i ] ) - '0';
if( ch < 0 || ch > 9 )
return( CRYPT_ERROR_BADDATA );
if( value >= ( MAX_INTLENGTH / 10 ) || \
valTmp >= MAX_INTLENGTH - ch )
return( CRYPT_ERROR_BADDATA );
value = valTmp + ch;
if( value < 0 || value > MAX_INTLENGTH )
return( CRYPT_ERROR_BADDATA );
}
Peter.
Powered by blists - more mailing lists