summaryrefslogtreecommitdiff
path: root/src/sha256.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-17 20:32:55 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-17 20:32:55 +0200
commit0bbabe80800bd80b245b6e8b2fff4d3a908c5ded (patch)
tree66db6ba92e5df873e703f7982988985005c20fdd /src/sha256.c
parent823a165119fccd8ace6b8d37619ef68b75ecd44f (diff)
downloadvim-git-0bbabe80800bd80b245b6e8b2fff4d3a908c5ded.tar.gz
Fixed encryption big/little endian test.
Use uint32_t to avoid crash on 64 bit machines. Added error numbers for Blowfish errors. Fixed the tiny version not building.
Diffstat (limited to 'src/sha256.c')
-rw-r--r--src/sha256.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/sha256.c b/src/sha256.c
index e15725528..de3211a92 100644
--- a/src/sha256.c
+++ b/src/sha256.c
@@ -1,23 +1,27 @@
/* vi:set ts=8 sts=4 sw=4:
*
- * FIPS-180-2 compliant SHA-256 implementation
- * GPL by Christophe Devine.
- * Modified for md5deep, in public domain.
- * Modified For Vim, GPL(C) Mohsin Ahmed, http://www.cs.albany.edu/~mosh
+ * VIM - Vi IMproved by Bram Moolenaar
*
- * 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.
+ * Do ":help uganda" in Vim to read copying and usage conditions.
+ * Do ":help credits" in Vim to see a list of people who contributed.
+ * See README.txt for an overview of the Vim source code.
+ *
+ * FIPS-180-2 compliant SHA-256 implementation
+ * GPL by Christophe Devine.
+ * Modified for md5deep, in public domain.
+ * Modified For Vim, Mohsin Ahmed, http://www.cs.albany.edu/~mosh
+ *
+ * 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.
*/
#include "vim.h"
#ifdef FEAT_CRYPT
-typedef unsigned long uint32_t;
-
typedef struct {
uint32_t total[2];
uint32_t state[8];