mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-12 08:43:53 -05:00
New BinarySink function 'put_padding'.
It is to put_data what memset is to memcpy. Several places in the code wanted it already, but not _quite_ enough for me to have written it with the rest of the BinarySink infrastructure originally.
This commit is contained in:
@ -356,8 +356,7 @@ int rsa_ssh1_savekey(const Filename *filename, struct RSAKey *key,
|
||||
* Now write zeros until the encrypted portion is a multiple of
|
||||
* 8 bytes.
|
||||
*/
|
||||
while ((buf->len - estart) % 8)
|
||||
put_byte(buf, 0);
|
||||
put_padding(buf, (estart - buf->len) & 7, 0);
|
||||
|
||||
/*
|
||||
* Now encrypt the encrypted portion.
|
||||
|
Reference in New Issue
Block a user