If this is wrong again, could you please tell me what IS the correct way of
getting the size of sha1_data2? I don't think I know other options than
sizeof or strlen...



Victor Duchovni wrote:
> 
> On Mon, Mar 30, 2009 at 06:57:02AM -0700, Goblin_Queen wrote:
> 
>> 
>> Thanks for pointing that out Stephen, as I said before, I'm still
>> learning
>> C++, so that's why I made such a stupid mistake. I suppose the correct
>> size
>> of sha1_data2 is strlen((const char*)sha1_data2), and that gives me 20
>> instead of 4, which sounds more reasonable.
> 
> No, this is still wrong, because some 20-byte SHA-1 signatures contain
> ASCII-NUL bytes. SHA-1 signatures are always 20 bytes (160 bits).
> 
> -- 
>       Viktor.
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           majord...@openssl.org
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Difference-between-RSA_sign-and-CryptSignHash-signature-tp22575898p22784476.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to