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