Re: strlen("NotDone'\0'Yet"); > Somewhere among the cobwebs I have pointer swizzling utilities that do
> this (strlen, that is) for char and int arrays used in extended
> precision arithmetic registers, where '\0' is valid non-termination
> value. I could dig them up if to see if they apply to your question if
> you're curious.
My use with reading bytes containing '\0' is encryption. Since I have access to
the size of the cipher-text, I can always store it in reference to the
cipher-text. I just wanted to know another fast and safe way to read such data,
if there is any.
If it's no bother to you MK, please post your "pointer swizzling utilities." I
think others will appreciate that; I know I will.
Thanks again to everyone who replied!
p.s. You'll get a cipher-text with '\0' before the string ends, if anyone is
curious to try these parameters out - found in man, but slightly modified.
unsigned char key[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
unsigned char iv[] = {1,2,3,4,5,6,7,8};
char intext[] = "Some Crypto Text";
EVP_EncryptInit_ex(&ctx, EVP_bf_cfb(), NULL, key, iv); |