diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-05-16 23:02:33 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-05-16 23:02:33 +0200 |
commit | 823a165119fccd8ace6b8d37619ef68b75ecd44f (patch) | |
tree | f0e02a702ae8220ffd2562fba213fab0df720c5f /src/blowfish.c | |
parent | 40e6a71c6777242a254f1748766aa0e60764ebb3 (diff) | |
download | vim-git-823a165119fccd8ace6b8d37619ef68b75ecd44f.tar.gz |
Minor updates to blowfish encryption.
Diffstat (limited to 'src/blowfish.c')
-rw-r--r-- | src/blowfish.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/blowfish.c b/src/blowfish.c index f5b8e9070..ab2e7e00f 100644 --- a/src/blowfish.c +++ b/src/blowfish.c @@ -1,6 +1,6 @@ /* vi:set ts=8 sts=4 sw=4: * - * Blowfish encryption for vim; in Blowfish output feedback mode. + * Blowfish encryption for Vim; in Blowfish output feedback mode. * GPL(C) Mohsin Ahmed, http://www.cs.albany.edu/~mosh * Based on http://www.schneier.com/blowfish.html by Bruce Schneier. */ @@ -399,10 +399,10 @@ bf_key_init(password) { int i, j, keypos = 0; long_u val, data_l, data_r; - char *key; + char_u *key; int keylen; - key = sha256_key((char *)password); + key = sha256_key(password); keylen = STRLEN(key); for (i = 0; i < 256; ++i) { @@ -416,7 +416,7 @@ bf_key_init(password) { val = 0; for (j = 0; j < 4; ++j) - val = (val << 8) | (key[keypos++ % keylen] & 0xff); + val = (val << 8) | key[keypos++ % keylen]; pax[i] = ipa[i] ^ val; } |