Little help please...

Tod Thomas tthomas at chubb.com
Wed Jun 1 17:11:59 CEST 2005


Brad Hards wrote:
> On Wed, 1 Jun 2005 21:09 pm, Tod Thomas wrote:
> 
>>>>gcry_cipher_decrypt(hd,decryptedtext,strlen(ciphertext),ciphertext,strlen
>>>>(ciphertext));
>>>
>>>This won't work:  You can't use strlen on CIPHERTEXT becuase that one
>>>is binary.
>>
>>Won't it?  All strings ultimately are just binary data.
> 
> But binary data will contain arbitrary nulls. strlen just looks for the first 
> one.
> 
> Brad

I was wondering about that.  What is the accepted way to gather the 
'length' of a binary value like this?  sizeof()?



More information about the Gcrypt-devel mailing list