When encrypting texts that generate b64encoded strings longer than 16 character the AESLib::encrypt will pad the text to the next paddedLen bytes. The paddedLen parameter is calculated locally but aes.padplaintext assumes side effect from the aes::calc_size_n_pad. (side effects are that size and pad parameter are set by the functioncall)
Would it be a good idea to add a function to calculate the padded length which also generates these side effects ?
int AES::get_padded_len(int p_size){
calc_size_n_pad(p_size);
return size;
}
When encrypting texts that generate b64encoded strings longer than 16 character the AESLib::encrypt will pad the text to the next paddedLen bytes. The paddedLen parameter is calculated locally but aes.padplaintext assumes side effect from the aes::calc_size_n_pad. (side effects are that size and pad parameter are set by the functioncall)
Would it be a good idea to add a function to calculate the padded length which also generates these side effects ?
int AES::get_padded_len(int p_size){ calc_size_n_pad(p_size); return size; }