2011/7/6 ZhouTony <redhat-1...@hotmail.com>

>  Hi all,
>
> I am new to this mail list. Have some questions about the API:
> DES_ede3_cbc_encrypt()
>
> void DES_ede3_cbc_encrypt(const unsigned char *input,
>  unsigned char *output, long length, DES_key_schedule *ks1,
> DES_key_schedule *ks2, DES_key_schedule *ks3, DES_cblock *ivec,
> int enc);
>
> 1. For the input chars parameter, does the input chars have to terminate
> with '\0'?
>
Not required, as the length parameter will determine the length of input

> 2. How to determine the output length? I guess strlen() is not correct
> because the encrypted output may have '\0' in the middle.
>
Will be similar to the input length.

> 3. I looked at the destest.c code in the openssl source package. It seems
> the output length for encrypt is determined by (inputlen + 7)/8*8. If this
> is the case, how to determine the output length for decrypt?
>
> Best Regards,
> Tony
>



-- 
Prashant Batra
Follow the dreams!!

Reply via email to