I thought about that before, thats why I'm Base64 encoding the data first then 
passing it on to be encrypted
so that there are not any nulls, also I am looking at the values in the 
debugger, breaking on each line and watching the vars
I'm not calling strlen(). so any ideas? right now I'm working on breaking my 
Base64 data into 8 byte chunks encrypting each chunk then appending it to a 
result string which I then Base64 again for network transport.

AJ
FIWC~US NAVY
RT/RD

-----Original Message-----
From: Vishal Rao [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 19, 2005 22:35
To: [email protected]; Mayorga, Armando CIV FLTINFOWARCEN NORFOLK
VA
Subject: Re: encryptor.Get() not returning all data given


Hi,

After doing Get() how do you find out the length of "ciphertext". Are
you doing a strlen()?
Again (this common mistake has come up before in this list and other
lists such as GNUPG), you cannot do strlen() on ciphertext or
plaintext coz they are not really text... if your ciphertext has a 0
byte in between somewhere then strlen will return you a wrong
value.... Can you look at the memory contents of your ciphertext in a
debugger and see if you are getting all the data.... Or I may be
mistaken it could be some other thing with the .MaxRetrievable() or
.Get()...

HTH,
Vishal Rao
http://www.e-lock.com/

On Wed, 19 Jan 2005 16:40:36 -0500, Mayorga, Armando CIV FLTINFOWARCEN
NORFOLK VA <[EMAIL PROTECTED]> wrote:
>  
> 
> i again, I am afraid that I am again having some problems perhaps =3D 
> someone could help with. 
> passing in 3280 bytes of base64 data. 
> 
>  outputLength =3D3D encryptor.MaxRetrievable(); //outputLength is =3D 
> returning 3280 
>  ciphertext =3D3D new byte[outputLength]; 
>  encryptor.Get(ciphertext, outputLength);               //ciphertext is only
> 127 
> 
> so Im just not getting everything back, What is the limit that =3D 
> encryptor.Get() can handle do I need to break my data up into chunks, = 
> =3D 
> encrypt a chunk and cat it to a result string? 
> 
> AJ Mayorga 
> FIWC~US.NAVY 
> RT/RD 


-- 
"Thou shalt not follow the null pointer for at it's end madness and chaos lie."

Reply via email to