Mercurial > vim
comparison src/structs.h @ 6122:18ac55444b37 v7.4.399
updated for version 7.4.399
Problem: Encryption implementation is messy. Blowfish encryption has a
weakness.
Solution: Refactor the encryption, store the state in an allocated struct
instead of using a save/restore mechanism. Introduce the
"blowfish2" method, which does not have the weakness and encrypts
the whole undo file. (largely by David Leadbeater)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 10 Aug 2014 13:38:34 +0200 |
parents | ef83b423ebf7 |
children | 54194bd6ed60 |
comparison
equal
deleted
inserted
replaced
6121:913d16b4904c | 6122:18ac55444b37 |
---|---|
1248 proftime_T slowest; /* time of slowest call */ | 1248 proftime_T slowest; /* time of slowest call */ |
1249 long count; /* nr of times used */ | 1249 long count; /* nr of times used */ |
1250 long match; /* nr of times matched */ | 1250 long match; /* nr of times matched */ |
1251 } syn_time_T; | 1251 } syn_time_T; |
1252 #endif | 1252 #endif |
1253 | |
1254 #ifdef FEAT_CRYPT | |
1255 /* | |
1256 * Structure to hold the type of encryption and the state of encryption or | |
1257 * decryption. | |
1258 */ | |
1259 typedef struct { | |
1260 int method_nr; | |
1261 void *method_state; /* method-specific state information */ | |
1262 } cryptstate_T; | |
1263 | |
1264 /* values for method_nr */ | |
1265 # define CRYPT_M_ZIP 0 | |
1266 # define CRYPT_M_BF 1 | |
1267 # define CRYPT_M_BF2 2 | |
1268 # define CRYPT_M_COUNT 3 /* number of crypt methods */ | |
1269 #endif | |
1270 | |
1253 | 1271 |
1254 /* | 1272 /* |
1255 * These are items normally related to a buffer. But when using ":ownsyntax" | 1273 * These are items normally related to a buffer. But when using ":ownsyntax" |
1256 * a window may have its own instance. | 1274 * a window may have its own instance. |
1257 */ | 1275 */ |
1776 #ifdef FEAT_NETBEANS_INTG | 1794 #ifdef FEAT_NETBEANS_INTG |
1777 int b_netbeans_file; /* TRUE when buffer is owned by NetBeans */ | 1795 int b_netbeans_file; /* TRUE when buffer is owned by NetBeans */ |
1778 int b_was_netbeans_file;/* TRUE if b_netbeans_file was once set */ | 1796 int b_was_netbeans_file;/* TRUE if b_netbeans_file was once set */ |
1779 #endif | 1797 #endif |
1780 | 1798 |
1781 }; | 1799 #ifdef FEAT_CRYPT |
1800 cryptstate_T *b_cryptstate; /* Encryption state while reading or writing | |
1801 * the file. NULL when not using encryption. */ | |
1802 #endif | |
1803 | |
1804 }; /* file_buffer */ | |
1782 | 1805 |
1783 | 1806 |
1784 #ifdef FEAT_DIFF | 1807 #ifdef FEAT_DIFF |
1785 /* | 1808 /* |
1786 * Stuff for diff mode. | 1809 * Stuff for diff mode. |