mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 17:28:23 +00:00
vim-patch:7.4.172
Problem: The blowfish code mentions output feedback, but the code is actually doing cipher feedback. Solution: Adjust names and comments. https://code.google.com/p/vim/source/detail?r=391e10afccf6879dcfab8b28cb1587a13eb835c0
This commit is contained in:

committed by
Thiago de Arruda

parent
26206d4cfd
commit
ade0c127e5
@@ -2324,7 +2324,7 @@ check_for_cryptkey (
|
||||
crypt_init_keys(cryptkey);
|
||||
else {
|
||||
bf_key_init(cryptkey, ptr + CRYPT_MAGIC_LEN, salt_len);
|
||||
bf_ofb_init(ptr + CRYPT_MAGIC_LEN + salt_len, seed_len);
|
||||
bf_cfb_init(ptr + CRYPT_MAGIC_LEN + salt_len, seed_len);
|
||||
}
|
||||
|
||||
/* Remove magic number from the text */
|
||||
@@ -2373,7 +2373,7 @@ int prepare_crypt_read(FILE *fp)
|
||||
if (fread(buffer, salt_len + seed_len, 1, fp) != 1)
|
||||
return FAIL;
|
||||
bf_key_init(curbuf->b_p_key, buffer, salt_len);
|
||||
bf_ofb_init(buffer + salt_len, seed_len);
|
||||
bf_cfb_init(buffer + salt_len, seed_len);
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
@@ -2407,7 +2407,7 @@ char_u *prepare_crypt_write(buf_T *buf, int *lenp)
|
||||
seed = salt + salt_len;
|
||||
sha2_seed(salt, salt_len, seed, seed_len);
|
||||
bf_key_init(buf->b_p_key, salt, salt_len);
|
||||
bf_ofb_init(seed, seed_len);
|
||||
bf_cfb_init(seed, seed_len);
|
||||
}
|
||||
}
|
||||
*lenp = CRYPT_MAGIC_LEN + salt_len + seed_len;
|
||||
|
Reference in New Issue
Block a user