From 5f5e4ea10c87285ed92c62b5dfdaebe8eb3e1df2 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 10 Feb 2012 00:51:37 -0800 Subject: [PATCH] Document secure-hash * 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 | 6 ++++++ doc/lispref/elisp.texi | 2 +- doc/lispref/text.texi | 20 ++++++++++++++++---- doc/lispref/vol1.texi | 2 +- doc/lispref/vol2.texi | 2 +- etc/NEWS | 1 + 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 40fefde4396..762f173563f 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,9 @@ +2012-02-10 Glenn Morris + + * 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 * loading.texi (Loading): Don't emphasize "library" terminology. diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index f69823101d0..cd688acd6ac 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -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. diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 8e7434de2ed..416bfef4a60 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -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 diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index 0f4a4447ed3..798bd0cabf6 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi @@ -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. diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 241728fd1d2..3ef7dd7f87f 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi @@ -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. diff --git a/etc/NEWS b/etc/NEWS index 816c636fdf7..df35fee46b9 100644 --- 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. -- 2.39.2