On Thu, Jul 18, 2002 at 05:06:20PM +0530, Srinivas Cheruku wrote:
> I am looking into the shatest.c file since i want to make use of sha-1
> message digest.
> 
> In this file openssl-0.9.6d/crypto/sha/shatest.c,
> 
> 141          for (i=0; i<1000; i++)
>    142                  SHA_Update(&c,buf,1000);
>    143          SHA_Final(md,&c);
> 
> For chunks of data we can call the SHA_Update() with those of chunks of data
> separately. 
> for eg: if there are two buffers buf1 and buf2, you should call the update
> function twice.
> 
> But here the SHA_Update is called 1000 times with the same buffer. Is it
> right? 

Yes. It is done to test the algorithm. Actually 1000000 bytes are processed
by adding the same 1000 bytes (all being `a` anyway) 1000 times.

Best regards,
        Lutz
-- 
Lutz Jaenicke                             [EMAIL PROTECTED]
http://www.aet.TU-Cottbus.DE/personen/jaenicke/
BTU Cottbus, Allgemeine Elektrotechnik
Universitaetsplatz 3-4, D-03044 Cottbus
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to