Mercurial > vim
diff src/fileio.c @ 5651:391e10afccf6 v7.4.172
updated for version 7.4.172
Problem: The blowfish code mentions output feedback, but the code is
actually doing cipher feedback.
Solution: Adjust names and comments.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 11 Feb 2014 15:23:32 +0100 |
parents | 1cdf51706774 |
children | 136f05449f29 |
line wrap: on
line diff
--- a/src/fileio.c +++ b/src/fileio.c @@ -2973,7 +2973,7 @@ check_for_cryptkey(cryptkey, ptr, sizep, 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 */ @@ -3025,7 +3025,7 @@ prepare_crypt_read(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; } @@ -3064,7 +3064,7 @@ prepare_crypt_write(buf, 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;