;;; sha1.el --- SHA1 Secure Hash Algorithm in Emacs-Lisp
-;; Copyright (C) 1999, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc.
;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
;; Keywords: SHA1, FIPS 180-1
:group 'sha1)
(defun sha1-string-external (string &optional binary)
- (let (prog args digest)
+ (let ((default-directory "/") ;; in case otherwise non-existent
+ (process-connection-type nil) ;; pipe
+ 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
- (set-buffer-multibyte nil)
+ (unless (featurep 'xemacs) (set-buffer-multibyte nil))
(insert string)
(apply (function call-process-region)
(point-min) (point-max)
(provide 'sha1)
-;; arch-tag: c0f9abd0-ffc1-4557-aac6-ece7f2d4c901
;;; sha1.el ends here