From 18ae1ec3ecfe22d55d6cdf595a442afebbc5595a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 18 May 2020 22:10:20 +0200 Subject: guix hash, guix download: Add '--hash'. * guix/scripts/download.scm (%default-options): Add 'hash-algorithm'. (show-help, %options): Add "--hash". (guix-download): Honor it. * guix/scripts/hash.scm (%default-options): Add 'hash-algorithm'. (show-help, %options): Add "--hash". (guix-hash): Honor it. * tests/guix-hash.sh: Test '-H sha512'. * doc/guix.texi (Invoking guix download): Document it. (Invoking guix hash): Document it. --- doc/guix.texi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 1ec30b8eeb..197207697e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -9018,6 +9018,11 @@ Certificates}), unless @option{--no-check-certificate} is used. The following options are available: @table @code +@item --hash=@var{algorithm} +@itemx -H @var{algorithm} +Compute a hash using the specified @var{algorithm}. @xref{Invoking guix +hash}, for more information. + @item --format=@var{fmt} @itemx -f @var{fmt} Write the hash in the format specified by @var{fmt}. For more @@ -9057,6 +9062,16 @@ following options: @table @code +@item --hash=@var{algorithm} +@itemx -H @var{algorithm} +Compute a hash using the specified @var{algorithm}, @code{sha256} by +default. + +@var{algorithm} must the name of a cryptographic hash algorithm +supported by Libgcrypt @i{via} Guile-Gcrypt---e.g., @code{sha512} or +@code{sha3-256} (@pxref{Hash Functions,,, guile-gcrypt, Guile-Gcrypt +Reference Manual}). + @item --format=@var{fmt} @itemx -f @var{fmt} Write the hash in the format specified by @var{fmt}. -- cgit v1.2.3