diff src/sha256.c @ 2184:5028c4d6d825 vim73

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.
author Bram Moolenaar <bram@vim.org>
date Mon, 17 May 2010 20:32:55 +0200
parents 3cb515c62e9c
children 014a996ac896
line wrap: on
line diff
--- 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
+ *
+ * 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.
  *
- *  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.
+ * 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];