Document secure-hash
authorGlenn Morris <rgm@gnu.org>
Fri, 10 Feb 2012 08:51:37 +0000 (00:51 -0800)
committerGlenn Morris <rgm@gnu.org>
Fri, 10 Feb 2012 08:51:37 +0000 (00:51 -0800)
* doc/lispref/text.texi (Checksum/Hash): Rename node from MD5 Checksum.
Mention secure-hash.
* doc/lispref/elisp.texi, doc/lispref/vol1.texi, doc/lispref/vol2.texi:
Update menu entry.
* etc/NEWS: Related markup.

doc/lispref/ChangeLog
doc/lispref/elisp.texi
doc/lispref/text.texi
doc/lispref/vol1.texi
doc/lispref/vol2.texi
etc/NEWS

index 40fefde..762f173 100644 (file)
@@ -1,3 +1,9 @@
+2012-02-10  Glenn Morris  <rgm@gnu.org>
+
+       * text.texi (Checksum/Hash): Rename node from MD5 Checksum.
+       Mention secure-hash.
+       * elisp.texi, vol1.texi, vol2.texi: Update menu entry.
+
 2012-02-10  Chong Yidong  <cyd@gnu.org>
 
        * loading.texi (Loading): Don't emphasize "library" terminology.
index f698231..cd688ac 100644 (file)
@@ -1061,7 +1061,7 @@ Text
 * Registers::               How registers are implemented.  Accessing
                               the text or position stored in a register.
 * Base 64::                 Conversion to or from base 64 encoding.
-* MD5 Checksum::            Compute the MD5 "message digest"/"checksum".
+* Checksum/Hash::           Computing "message digests"/"checksums"/"hashes".
 * Atomic Changes::          Installing several buffer changes "atomically".
 * Change Hooks::            Supplying functions to be run when text is changed.
 
index 8e7434d..416bfef 100644 (file)
@@ -56,7 +56,7 @@ the character after point.
 * Registers::        How registers are implemented.  Accessing the text or
                        position stored in a register.
 * Base 64::          Conversion to or from base 64 encoding.
-* MD5 Checksum::     Compute the MD5 "message digest"/"checksum".
+* Checksum/Hash::    Computing "message digests"/"checksums"/"hashes".
 * Parsing HTML::     Parsing HTML and XML.
 * Atomic Changes::   Installing several buffer changes "atomically".
 * Change Hooks::     Supplying functions to be run when text is changed.
@@ -4071,9 +4071,11 @@ decoded text.
 The decoding functions ignore newline characters in the encoded text.
 @end defun
 
-@node MD5 Checksum
-@section MD5 Checksum
+@node Checksum/Hash
+@section Checksum/Hash
 @cindex MD5 checksum
+@cindex hashing, secure
+@cindex SHA-1
 @cindex message digest computation
 
   MD5 cryptographic checksums, or @dfn{message digests}, are 128-bit
@@ -4084,7 +4086,7 @@ RFC@footnote{
 For an explanation of what is an RFC, see the footnote in @ref{Base
 64}.
 }1321.  This section describes the Emacs facilities for computing
-message digests.
+message digests and other forms of ``secure hash''.
 
 @defun md5 object &optional start end coding-system noerror
 This function returns the MD5 message digest of @var{object}, which
@@ -4119,6 +4121,16 @@ using the specified or chosen coding system.  However, if
 coding instead.
 @end defun
 
+@defun secure-hash algorithm object &optional start end binary
+This function provides a general interface to a variety of secure
+hashing algorithms.  As well as the MD5 algorithm, it supports SHA-1,
+SHA-2, SHA-224, SHA-256, SHA-384 and SHA-512.  The argument
+@var{algorithm} is a symbol stating which hash to compute.  The
+arguments @var{object}, @var{start}, and @var{end} are as for the
+@code{md5} function.  If the optional argument @var{binary} is
+non-@code{nil}, returns a string in binary form.
+@end defun
+
 @node Parsing HTML
 @section Parsing HTML
 @cindex parsing html
index 0f4a444..798bd0c 100644 (file)
@@ -1082,7 +1082,7 @@ Text
 * Registers::               How registers are implemented.  Accessing
                               the text or position stored in a register.
 * Base 64::                 Conversion to or from base 64 encoding.
-* MD5 Checksum::            Compute the MD5 "message digest"/"checksum".
+* Checksum/Hash::           Computing "message digests"/"checksums"/"hashes".
 * Atomic Changes::          Installing several buffer changes "atomically".
 * Change Hooks::            Supplying functions to be run when text is changed.
 
index 241728f..3ef7dd7 100644 (file)
@@ -1081,7 +1081,7 @@ Text
 * Registers::               How registers are implemented.  Accessing
                               the text or position stored in a register.
 * Base 64::                 Conversion to or from base 64 encoding.
-* MD5 Checksum::            Compute the MD5 "message digest"/"checksum".
+* Checksum/Hash::           Computing "message digests"/"checksums"/"hashes".
 * Atomic Changes::          Installing several buffer changes "atomically".
 * Change Hooks::            Supplying functions to be run when text is changed.
 
index 816c636..df35fee 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -408,6 +408,7 @@ in the corresponding way.
 +++
 ** The variable `focus-follows-mouse' now always defaults to nil.
 
++++
 ** New primitive `secure-hash' that supports many secure hash algorithms:
 md5, sha1, sha2, sha224, sha256, sha384, and sha512.  The lisp library
 sha1.el has been removed.  The `sha1' feature is provided by default.