From 85338fe1d5a56f82546e16c305c2048c081771e0 Mon Sep 17 00:00:00 2001 From: John Schmidt Date: Wed, 7 May 2014 18:04:54 +0200 Subject: Remove cryptography As discussed in #694, vim encryption uses old, obsolete algorithms that are poorly implemented. Since insecure cryptography is worse than no cryptgraphy, the community voted in favor of removing all crypto. Various alternatives to the old crypto is being discussed in #701. Closes #694. --- src/nvim/sha256.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/nvim/sha256.c') diff --git a/src/nvim/sha256.c b/src/nvim/sha256.c index 549448a6e0..4a61ddc66f 100644 --- a/src/nvim/sha256.c +++ b/src/nvim/sha256.c @@ -9,7 +9,6 @@ /// /// Vim specific notes: /// Functions exported by this file: -/// 1. sha256_key() hashes the password to 64 bytes char string. /// 2. sha2_seed() generates a random header. /// sha256_self_test() is implicitly called once. @@ -284,23 +283,6 @@ char_u *sha256_bytes(char_u *buf, int buf_len, char_u *salt, int salt_len) return hexit; } -/// Gets sha256(buf) as 64 hex characters in a static array. -/// -/// @param buf -/// @param salt -/// @param salt_len -/// -/// @returns sha256(buf) as 64 hex chars in static array. -char_u* sha256_key(char_u *buf, char_u *salt, int salt_len) -{ - // No passwd means don't encrypt - if ((buf == NULL) || (*buf == NUL)) { - return (char_u *)""; - } - - return sha256_bytes(buf, (int)STRLEN(buf), salt, salt_len); -} - // These are the standard FIPS-180-2 test vectors static char *sha_self_test_msg[] = { "abc", -- cgit