From 80794b1ce64b394fe6a1355ddd7159d1c97d6f48 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 13 Jun 2010 05:20:42 +0200 Subject: Added salt to blowfish encryption. --- src/proto/blowfish.pro | 2 +- src/proto/sha256.pro | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/proto') diff --git a/src/proto/blowfish.pro b/src/proto/blowfish.pro index da3560e78..ba18176fb 100644 --- a/src/proto/blowfish.pro +++ b/src/proto/blowfish.pro @@ -1,5 +1,5 @@ /* blowfish.c */ -void bf_key_init __ARGS((char_u *password)); +void bf_key_init __ARGS((char_u *password, char_u *salt, int salt_len)); void bf_ofb_init __ARGS((char_u *iv, int iv_len)); void bf_crypt_encode __ARGS((char_u *from, size_t len, char_u *to)); void bf_crypt_decode __ARGS((char_u *ptr, long len)); diff --git a/src/proto/sha256.pro b/src/proto/sha256.pro index c5237f439..651a0a0af 100644 --- a/src/proto/sha256.pro +++ b/src/proto/sha256.pro @@ -2,7 +2,7 @@ void sha256_start __ARGS((context_sha256_T *ctx)); void sha256_update __ARGS((context_sha256_T *ctx, char_u *input, UINT32_T length)); void sha256_finish __ARGS((context_sha256_T *ctx, char_u digest[32])); -char_u *sha256_key __ARGS((char_u *buf)); +char_u *sha256_key __ARGS((char_u *buf, char_u *salt, int salt_len)); int sha256_self_test __ARGS((void)); -void sha2_seed __ARGS((char_u header[], int header_len)); +void sha2_seed __ARGS((char_u header[], int header_len, char_u salt[], int salt_len)); /* vim: set ft=c : */ -- cgit v1.2.1