boring icon indicating copy to clipboard operation
boring copied to clipboard

Fix wrong assert if padding is disabled

Open simc opened this issue 4 years ago • 4 comments
trafficstars

simc avatar Mar 19 '21 21:03 simc

@leisim Could you give more context for the issue that this one fixes, please? Regression test would be useful too

inikulin avatar Mar 26 '21 14:03 inikulin

@inikulin This assert assert!(output.len() >= input.len() + block_size); requires the output size to be greater than the input size to make sure there is enough space for padding. If no padding is used (not necessary if the input size is a multiple of the cipher block size) the output of the encryption has the exact same size as the input.

I'll add a regression test :+1:

simc avatar Mar 26 '21 15:03 simc

@leisim seems like needs a rebase and a regression test

inikulin avatar Jun 01 '21 08:06 inikulin

@simc Ping?

nox avatar Oct 09 '23 11:10 nox