updated for version 7.3.816
Problem:    Can't compute a hash.
Solution:   Add the sha256() function. (Tyru, Hirohito Higashi)
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 9819d9b..b1748c1 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1931,6 +1931,7 @@
 settabwinvar( {tabnr}, {winnr}, {varname}, {val})    set {varname} in window
 					{winnr} in tab page {tabnr} to {val}
 setwinvar( {nr}, {varname}, {val})	set {varname} in window {nr} to {val}
+sha256( {string})		String	SHA256 checksum of {string}
 shellescape( {string} [, {special}])
 				String	escape {string} for use as shell
 					command argument
@@ -5336,6 +5337,11 @@
 			:call setwinvar(1, "&list", 0)
 			:call setwinvar(2, "myvar", "foobar")
 
+sha256({string})						*sha256()*
+		Returns a String with 64 hex charactes, which is the SHA256
+		checksum of {string}.
+		{only available when compiled with the |+cryptv| feature}
+
 shellescape({string} [, {special}])			*shellescape()*
 		Escape {string} for use as a shell command argument.
 		On MS-Windows and MS-DOS, when 'shellslash' is not set, it
diff --git a/src/eval.c b/src/eval.c
index dc7c240..9f63d45 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -688,6 +688,9 @@
 static void f_settabvar __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_settabwinvar __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_setwinvar __ARGS((typval_T *argvars, typval_T *rettv));
+#ifdef FEAT_CRYPT
+static void f_sha256 __ARGS((typval_T *argvars, typval_T *rettv));
+#endif /* FEAT_CRYPT */
 static void f_shellescape __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_shiftwidth __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_simplify __ARGS((typval_T *argvars, typval_T *rettv));
@@ -8055,6 +8058,9 @@
     {"settabvar",	3, 3, f_settabvar},
     {"settabwinvar",	4, 4, f_settabwinvar},
     {"setwinvar",	3, 3, f_setwinvar},
+#ifdef FEAT_CRYPT
+    {"sha256",		1, 1, f_sha256},
+#endif
     {"shellescape",	1, 2, f_shellescape},
     {"shiftwidth",	0, 0, f_shiftwidth},
     {"simplify",	1, 1, f_simplify},
@@ -16710,6 +16716,24 @@
     }
 }
 
+#ifdef FEAT_CRYPT
+/*
+ * "sha256({string})" function
+ */
+    static void
+f_sha256(argvars, rettv)
+    typval_T	*argvars;
+    typval_T	*rettv;
+{
+    char_u	*p;
+
+    p = get_tv_string(&argvars[0]);
+    rettv->vval.v_string = vim_strsave(
+				    sha256_bytes(p, (int)STRLEN(p), NULL, 0));
+    rettv->v_type = VAR_STRING;
+}
+#endif /* FEAT_CRYPT */
+
 /*
  * "shellescape({string})" function
  */
diff --git a/src/proto/sha256.pro b/src/proto/sha256.pro
index 3c4d975..464b354 100644
--- a/src/proto/sha256.pro
+++ b/src/proto/sha256.pro
@@ -2,6 +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_bytes __ARGS((char_u *buf, int buf_len, char_u *salt, int salt_len));
 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, char_u *salt, int salt_len));
diff --git a/src/sha256.c b/src/sha256.c
index 3392fc0..0cfe0eb 100644
--- a/src/sha256.c
+++ b/src/sha256.c
@@ -273,14 +273,13 @@
 #endif /* FEAT_CRYPT || FEAT_PERSISTENT_UNDO */
 
 #if defined(FEAT_CRYPT) || defined(PROTO)
-static char_u *sha256_bytes __ARGS((char_u *buf, int buf_len, char_u *salt, int salt_len));
 static unsigned int get_some_time __ARGS((void));
 
 /*
  * Returns hex digest of "buf[buf_len]" in a static array.
  * if "salt" is not NULL also do "salt[salt_len]".
  */
-    static char_u *
+    char_u *
 sha256_bytes(buf, buf_len, salt, salt_len)
     char_u *buf;
     int    buf_len;
diff --git a/src/testdir/Make_amiga.mak b/src/testdir/Make_amiga.mak
index c1a8bd6..19d8910 100644
--- a/src/testdir/Make_amiga.mak
+++ b/src/testdir/Make_amiga.mak
@@ -32,7 +32,7 @@
 		test71.out test72.out test73.out test74.out test75.out \
 		test76.out test77.out test78.out test79.out test80.out \
 		test81.out test82.out test83.out test84.out test88.out \
-		test89.out
+		test89.out test90.out
 
 .SUFFIXES: .in .out
 
@@ -138,3 +138,4 @@
 test84.out: test84.in
 test88.out: test88.in
 test89.out: test89.in
+test90.out: test90.in
diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak
index fb52e80..99963e8 100644
--- a/src/testdir/Make_dos.mak
+++ b/src/testdir/Make_dos.mak
@@ -31,7 +31,7 @@
 		test74.out test75.out test76.out test77.out test78.out \
 		test79.out test80.out test81.out test82.out test83.out \
 		test84.out test85.out test86.out test87.out test88.out \
-		test89.out
+		test89.out test90.out
 
 SCRIPTS32 =	test50.out test70.out
 
diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak
index 8aab596..32d1db5 100644
--- a/src/testdir/Make_ming.mak
+++ b/src/testdir/Make_ming.mak
@@ -51,7 +51,7 @@
 		test74.out test75.out test76.out test77.out test78.out \
 		test79.out test80.out test81.out test82.out test83.out \
 		test84.out test85.out test86.out test87.out test88.out \
-		test89.out
+		test89.out test90.out
 
 SCRIPTS32 =	test50.out test70.out
 
diff --git a/src/testdir/Make_os2.mak b/src/testdir/Make_os2.mak
index d052855..2f46a41 100644
--- a/src/testdir/Make_os2.mak
+++ b/src/testdir/Make_os2.mak
@@ -32,7 +32,7 @@
 		test71.out test72.out test73.out test74.out test75.out \
 		test76.out test77.out test78.out test79.out test80.out \
 		test81.out test82.out test83.out test84.out test88.out \
-		test89.out
+		test89.out test90.out
 
 .SUFFIXES: .in .out
 
diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms
index df5b660..a0d29d7 100644
--- a/src/testdir/Make_vms.mms
+++ b/src/testdir/Make_vms.mms
@@ -4,7 +4,7 @@
 # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
 #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
 #
-# Last change:  2012 Dec 05
+# Last change:  2013 Feb 13
 #
 # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
 # Edit the lines in the Configuration section below to select.
@@ -76,7 +76,8 @@
 	 test66.out test67.out test68.out test69.out \
 	 test71.out test72.out test74.out test75.out test76.out \
 	 test77.out test78.out test79.out test80.out test81.out \
-	 test82.out test83.out test84.out test88.out test89.out
+	 test82.out test83.out test84.out test88.out test89.out \
+	 test90.out
 
 # Known problems:
 # Test 30: a problem around mac format - unknown reason
diff --git a/src/testdir/Makefile b/src/testdir/Makefile
index 6ca89dc..1920834 100644
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -28,7 +28,7 @@
 		test74.out test75.out test76.out test77.out test78.out \
 		test79.out test80.out test81.out test82.out test83.out \
 		test84.out test85.out test86.out test87.out test88.out \
-		test89.out
+		test89.out test90.out
 
 SCRIPTS_GUI = test16.out
 
diff --git a/src/version.c b/src/version.c
index 5a9f65d..06f4f88 100644
--- a/src/version.c
+++ b/src/version.c
@@ -726,6 +726,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    816,
+/**/
     815,
 /**/
     814,