projects
/
gnus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Query the user for whether to store the credentials.
[gnus]
/
lisp
/
md4.el
diff --git
a/lisp/md4.el
b/lisp/md4.el
index
1343509
..
6b28f75
100644
(file)
--- a/
lisp/md4.el
+++ b/
lisp/md4.el
@@
-1,6
+1,6
@@
;;; md4.el --- MD4 Message Digest Algorithm.
;;; md4.el --- MD4 Message Digest Algorithm.
-;; Copyright (C) 2001, 2004, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2004, 2007, 2008
, 2009, 2010
Free Software Foundation, Inc.
;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Keywords: MD4
;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Keywords: MD4
@@
-9,10
+9,10
@@
;; This file is part of GNU Emacs.
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software
;
you can redistribute it and/or modify
+;; 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
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation
; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation
, either version 3 of the License, or
+;;
(at your option)
any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-20,9
+20,7
@@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; 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/>.
;;; Code:
;;; Code:
@@
-30,11
+28,12
@@
;;; MD4 hash calculation
(defvar md4-buffer (make-vector 4 '(0 . 0))
;;; MD4 hash calculation
(defvar md4-buffer (make-vector 4 '(0 . 0))
- "
work buffer of four 32-bit integers
")
+ "
Work buffer of four 32-bit integers.
")
(defun md4 (in n)
(defun md4 (in n)
- "Returns the MD4 hash string of 16 bytes long for a string IN of N
-bytes long. N is required to handle strings containing character 0."
+ "Return the MD4 hash for a string IN of length N bytes.
+The returned hash is 16 bytes long. N is required to handle
+strings containing the character 0."
(let (m
(b (cons 0 (* n 8)))
(i 0)
(let (m
(b (cons 0 (* n 8)))
(i 0)
@@
-117,8
+116,9
@@
bytes long. N is required to handle strings containing character 0."
(cons (logand (car x) (car y)) (logand (cdr x) (cdr y))))
(defun md4-64 (m)
(cons (logand (car x) (car y)) (logand (cdr x) (cdr y))))
(defun md4-64 (m)
- "Calculate md4 of 64 bytes chunk M which is represented as 16 pairs of
-32 bits integers. The resulting md4 value is placed in md4-buffer."
+ "Calculate MD4 hash of M.
+M is a 64-bytes chunk, represented as 16 pairs of 32-bit integers.
+The resulting MD4 value is placed in `md4-buffer'."
(let ((a (aref md4-buffer 0))
(b (aref md4-buffer 1))
(c (aref md4-buffer 2))
(let ((a (aref md4-buffer 0))
(b (aref md4-buffer 1))
(c (aref md4-buffer 2))
@@
-201,8
+201,9
@@
bytes long. N is required to handle strings containing character 0."
str))
(defun md4-pack-int32 (int32)
str))
(defun md4-pack-int32 (int32)
- "Pack 32 bits integer in a 4 bytes string as little endian. A 32 bits
-integer is represented as a pair of two 16 bits integers (cons high low)."
+ "Pack 32 bits integer in a 4 bytes string as little endian.
+A 32 bits integer is represented as a pair of two 16 bits
+integers (cons high low)."
(let ((str (make-string 4 0))
(h (car int32)) (l (cdr int32)))
(aset str 0 (logand l 255))
(let ((str (make-string 4 0))
(h (car int32)) (l (cdr int32)))
(aset str 0 (logand l 255))
@@
-224,5
+225,4
@@
integer is represented as a pair of two 16 bits integers (cons high low)."
(provide 'md4)
(provide 'md4)
-;;; arch-tag: 99d706fe-089b-42ea-9507-67ae41091e6e
;;; md4.el ends here
;;; md4.el ends here