Hi,

I noticed a difference in output when using the commandline SHA1 function
and the one from the API (using a c program).

I'm using the datastring "abcdefghijklmnopqrstuvwxyz" in a file called data1
as input for the folowing command:

> cat data1 | openssl sha1 -sha1

This results in the folowing output:

> 8c723a0fa70b111017b4a6f06afe1c0dbcec14e3

Using the same input in a c-program (modified version of
openssl/test/sha1test) it results in the output:

> 32d10c7b8cf96570ca04ce37f2a19d84240d3a89

This is propably the correct one, since it's the same as the sha on other
platforms (like Tandem Cryptlib and Baltimore).

Does anyone know what I'm missing here!?




Modifications in sha1test.c
--------------------------------
- Made one of the input strings "abcdefghijklmnopqrstuvwxyz"
- Modified the print ok statement to
       printf("test %d ( %s ) ok\n",i, p);
  so it prints the hash value 'p' as well.



Thanx in advance,

Pim


================================================
De informatie opgenomen in dit bericht kan vertrouwelijk zijn en 
is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht 
onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken en 
de afzender direct te informeren door het bericht te retourneren. 
================================================
The information contained in this message may be confidential 
and is intended to be exclusively for the addressee. Should you 
receive this message unintentionally, please do not use the contents 
herein and notify the sender immediately by return e-mail.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to