1 // SPDX-License-Identifier: GPL-2.0+
4 * Joe Hershberger, National Instruments, joe.hershberger@ni.com
7 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
12 #include <u-boot/sha1.h>
14 int do_sha1sum(struct cmd_tbl
*cmdtp
, int flag
, int argc
, char *const argv
[])
16 int flags
= HASH_FLAG_ENV
;
25 #ifdef CONFIG_SHA1SUM_VERIFY
26 if (strcmp(*av
, "-v") == 0) {
27 flags
|= HASH_FLAG_VERIFY
;
33 return hash_command("sha1", flags
, cmdtp
, flag
, ac
, av
);
36 #ifdef CONFIG_SHA1SUM_VERIFY
38 sha1sum
, 5, 1, do_sha1sum
,
39 "compute SHA1 message digest",
40 "address count [[*]sum]\n"
41 " - compute SHA1 message digest [save to sum]\n"
42 "sha1sum -v address count [*]sum\n"
43 " - verify sha1sum of memory area"
47 sha1sum
, 4, 1, do_sha1sum
,
48 "compute SHA1 message digest",
49 "address count [[*]sum]\n"
50 " - compute SHA1 message digest [save to sum]"