aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Kangas2019-09-16 10:45:14 +0200
committerStefan Kangas2019-09-20 20:47:47 +0200
commit6d50010b34dbbcb90a7b4512f97e07fd8beceea5 (patch)
treecc43618d3626c667c9658c4a69db8cf784563bac /lisp
parentb8e9baac9ada62c2ea7437579df4be9d4f437fda (diff)
downloademacs-6d50010b34dbbcb90a7b4512f97e07fd8beceea5.tar.gz
emacs-6d50010b34dbbcb90a7b4512f97e07fd8beceea5.zip
Recommend against SHA-1 and MD5 for security
* doc/lispref/text.texi (Checksum/Hash): * src/fns.c (Fmd5, Fsecure_hash): * lisp/subr.el (sha1): Doc fix to recommend against SHA-1 and MD5 for security-related applications, since they are not collision resistant. (Bug#37420)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/subr.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 0b47da884b7..45b99a82d2b 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3120,11 +3120,15 @@ Otherwise, return nil."
3120 raw-field))) 3120 raw-field)))
3121 3121
3122(defun sha1 (object &optional start end binary) 3122(defun sha1 (object &optional start end binary)
3123 "Return the SHA1 (Secure Hash Algorithm) of an OBJECT. 3123 "Return the SHA-1 (Secure Hash Algorithm) of an OBJECT.
3124OBJECT is either a string or a buffer. Optional arguments START and 3124OBJECT is either a string or a buffer. Optional arguments START and
3125END are character positions specifying which portion of OBJECT for 3125END are character positions specifying which portion of OBJECT for
3126computing the hash. If BINARY is non-nil, return a string in binary 3126computing the hash. If BINARY is non-nil, return a string in binary
3127form." 3127form.
3128
3129Note that SHA-1 is not collision resistant and should not be used
3130for anything security-related. See `secure-hash' for
3131alternatives."
3128 (secure-hash 'sha1 object start end binary)) 3132 (secure-hash 'sha1 object start end binary))
3129 3133
3130(defun function-get (f prop &optional autoload) 3134(defun function-get (f prop &optional autoload)