projects
/
gnus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(imap-last-authenticator): Define imap-last-authenticator as a variable
[gnus]
/
lisp
/
sha1.el
diff --git
a/lisp/sha1.el
b/lisp/sha1.el
index
146aa63
..
4aca53f
100644
(file)
--- a/
lisp/sha1.el
+++ b/
lisp/sha1.el
@@
-1,27
+1,25
@@
;;; sha1.el --- SHA1 Secure Hash Algorithm in Emacs-Lisp
;; Copyright (C) 1999, 2001, 2002, 2003, 2004,
;;; sha1.el --- SHA1 Secure Hash Algorithm in Emacs-Lisp
;; Copyright (C) 1999, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2005, 2006, 2007
, 2008, 2009
Free Software Foundation, Inc.
;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
;; Keywords: SHA1, FIPS 180-1
;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
;; Keywords: SHA1, FIPS 180-1
-;; This file is part of
FLIM (Faithful Library about Internet Message)
.
+;; This file is part of
GNU Emacs
.
-;;
This program is free software; you can redistribute it and/or
-;;
modify it under the terms of the GNU General Public License as
-;;
published by the Free Software Foundation; either version 3
, or
+;;
GNU Emacs is free software: you can redistribute it and/or modify
+;;
it under the terms of the GNU General Public License as published by
+;;
the Free Software Foundation, either version 3 of the License
, or
;; (at your option) any later version.
;; (at your option) any later version.
-;;
This program
is distributed in the hope that it will be useful,
+;;
GNU Emacs
is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Commentary:
@@
-65,7
+63,7
@@
:group 'extensions)
(defcustom sha1-maximum-internal-length 500
:group 'extensions)
(defcustom sha1-maximum-internal-length 500
- "
*
Maximum length of message to use Lisp version of SHA1 function.
+ "Maximum length of message to use Lisp version of SHA1 function.
If message is longer than this, `sha1-program' is used instead.
If this variable is set to 0, use external program only.
If message is longer than this, `sha1-program' is used instead.
If this variable is set to 0, use external program only.
@@
-74,7
+72,7
@@
If this variable is set to nil, use internal function only."
:group 'sha1)
(defcustom sha1-program '("sha1sum")
:group 'sha1)
(defcustom sha1-program '("sha1sum")
- "
*
Name of program to compute SHA1.
+ "Name of program to compute SHA1.
It must be a string \(program name\) or list of strings \(name and its args\)."
:type '(repeat string)
:group 'sha1)
It must be a string \(program name\) or list of strings \(name and its args\)."
:type '(repeat string)
:group 'sha1)
@@
-82,22
+80,23
@@
It must be a string \(program name\) or list of strings \(name and its args\)."
(defcustom sha1-use-external (condition-case ()
(executable-find (car sha1-program))
(error))
(defcustom sha1-use-external (condition-case ()
(executable-find (car sha1-program))
(error))
- "
*
Use external SHA1 program.
+ "Use external SHA1 program.
If this variable is set to nil, use internal function only."
:type 'boolean
:group 'sha1)
(defun sha1-string-external (string &optional binary)
If this variable is set to nil, use internal function only."
:type 'boolean
:group 'sha1)
(defun sha1-string-external (string &optional binary)
- (let (prog args digest
default-enable-multibyte-characters
)
+ (let (prog args digest)
(if (consp sha1-program)
(setq prog (car sha1-program)
args (cdr sha1-program))
(setq prog sha1-program
args nil))
(with-temp-buffer
(if (consp sha1-program)
(setq prog (car sha1-program)
args (cdr sha1-program))
(setq prog sha1-program
args nil))
(with-temp-buffer
+ (set-buffer-multibyte nil)
(insert string)
(apply (function call-process-region)
(insert string)
(apply (function call-process-region)
- (point-min)(point-max)
+ (point-min)
(point-max)
prog t t nil args)
;; SHA1 is 40 bytes long in hexadecimal form.
(setq digest (buffer-substring (point-min)(+ (point-min) 40))))
prog t t nil args)
;; SHA1 is 40 bytes long in hexadecimal form.
(setq digest (buffer-substring (point-min)(+ (point-min) 40))))