#### Topic: [SOLVED] How to know the data length of decrypt data with AES cbc?

Hi,

I am trying to use wc_AesCbcEncryptWithKey() and wc_AesCbcDecryptWithKey() for encrypt/decrypt data with AES128 CBC algorithm.

The function wc_AesCbcDecryptWithKey() has no ouput parameter for decrypt data length. So, when the plain text length is not multiple of 16, how can I know the exact decrypt data length?

I tried to use memset() for initialing decrypt buffer as all 0, then expect getting the exact decrypt length by strlen(). But I am failed. In decrypt buffer, after real plain text data, the padding are some abnormal data, not all 0.

Could you please give me some guide? Thanks.