Function: eca-process--check-sha256
eca-process--check-sha256 is a natively compiled function defined in
eca-process.el.
Signature
(eca-process--check-sha256 DOWNLOAD-PATH URL VERSION)
Documentation
Check sha256 checksum of archive at DOWNLOAD-PATH.
The archive should be retrieved from URL and have the given VERSION.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-process.el
(defun eca-process--check-sha256 (download-path url version)
"Check sha256 checksum of archive at DOWNLOAD-PATH.
The archive should be retrieved from URL and have
the given VERSION."
(if-let* ((asset (seq-find
(lambda (asset)
(let ((asset-url (plist-get asset :browser_download_url)))
(and (stringp asset-url)
(string-equal url asset-url))))
(eca-process--get-property :assets version)))
(digest (plist-get asset :digest))
(sha256 (and (stringp digest)
(string-match "sha256:" digest)
(substring digest (match-end 0)))))
(unless (string-equal
sha256
(eca-process--get-file-sha256 download-path))
(error "The downloaded archive for the eca binary is corrupted"))
(eca-warn "Cannot retrieve sha256 for the eca binary archive, skipping checksum verification")))