Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun file-hash (fname)
- "Return sha256 of file."
- (interactive)
- (with-temp-buffer
- (call-process "sha256sum" nil t nil "-b" fname)
- (buffer-substring-no-properties (point-min) (+ (point-min) 64))))
- (defun string-hash (str)
- "Return sha256 of string."
- (interactive)
- (upcase (secure-hash 'sha256 str)))
Add Comment
Please, Sign In to add comment