Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
hash region
(defun hash-region (algorithm beg end)
(completing-read "Hash type: " '(md5 sha1 sha224 sha256 sha384 sha512))
(if (use-region-p) (region-beginning) (point-min))
(if (use-region-p) (region-end) (point-max))))
(message "%s: %s"
algorithm (secure-hash (intern algorithm) (current-buffer) beg end)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.