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.
13 #include <u-boot/sha1.h>
15 int do_sha1sum(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
17 int flags = HASH_FLAG_ENV;
26 #ifdef CONFIG_SHA1SUM_VERIFY
27 if (strcmp(*av, "-v") == 0) {
28 flags |= HASH_FLAG_VERIFY;
34 return hash_command("sha1", flags, cmdtp, flag, ac, av);
37 #ifdef CONFIG_SHA1SUM_VERIFY
39 sha1sum, 5, 1, do_sha1sum,
40 "compute SHA1 message digest",
41 "address count [[*]sum]\n"
42 " - compute SHA1 message digest [save to sum]\n"
43 "sha1sum -v address count [*]sum\n"
44 " - verify sha1sum of memory area"
48 sha1sum, 4, 1, do_sha1sum,
49 "compute SHA1 message digest",
50 "address count [[*]sum]\n"
51 " - compute SHA1 message digest [save to sum]"