1
0
mirror of https://github.com/biergaizi/codecrypt synced 2024-06-27 01:08:15 +00:00

algos_enc: clarify padding checks

This commit is contained in:
Mirek Kratochvil 2013-10-06 09:18:08 +02:00
parent e795744eef
commit 594e3c0ebc

@ -201,7 +201,10 @@ static bool message_unpad (std::vector<byte> in, bvector&out,
uint in_end = in.size() - padsize_end - 1;
in.resize (in_end);
//check if padding was really okay (TODO is it necessary?)
/* check if padding was really okay. Note that it is not necessary
* since the padded message is "already checked" for mangling by F-O
* padding. This is only a check that sender uses the same valid
* padding method as we do. */
byte check_begin, check_end;
msg_pad_length (in, check_begin, check_end, pad_hash);
if (padsize_begin != check_begin || padsize_end != check_end)