Function: sha1
sha1 is a byte-compiled function defined in subr.el.gz.
Signature
(sha1 OBJECT &optional START END BINARY)
Documentation
Return the SHA-1 (Secure Hash Algorithm) of an OBJECT.
OBJECT is either a string or a buffer. Optional arguments START and END are character positions specifying which portion of OBJECT for computing the hash. If BINARY is non-nil, return a 20-byte unibyte string; otherwise return a 40-character string.
Note that SHA-1 is not collision resistant and should not be used
for anything security-related. See secure-hash for
alternatives.
Probably introduced at or before Emacs version 24.1.
Source Code
;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun sha1 (object &optional start end binary)
"Return the SHA-1 (Secure Hash Algorithm) of an OBJECT.
OBJECT is either a string or a buffer. Optional arguments START and
END are character positions specifying which portion of OBJECT for
computing the hash. If BINARY is non-nil, return a 20-byte unibyte
string; otherwise return a 40-character string.
Note that SHA-1 is not collision resistant and should not be used
for anything security-related. See `secure-hash' for
alternatives."
(declare (side-effect-free t))
(secure-hash 'sha1 object start end binary))