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.
15 #include <u-boot/md5.h>
18 static int do_md5sum(struct cmd_tbl
*cmdtp
, int flag
, int argc
,
21 int flags
= HASH_FLAG_ENV
;
30 if (IS_ENABLED(CONFIG_MD5SUM_VERIFY
) && strcmp(*av
, "-v") == 0) {
31 flags
|= HASH_FLAG_VERIFY
;
36 return hash_command("md5", flags
, cmdtp
, flag
, ac
, av
);
39 #if IS_ENABLED(CONFIG_MD5SUM_VERIFY)
41 md5sum
, 5, 1, do_md5sum
,
42 "compute MD5 message digest",
43 "address count [[*]sum]\n"
44 " - compute MD5 message digest [save to sum]\n"
45 "md5sum -v address count [*]sum\n"
46 " - verify md5sum of memory area"
50 md5sum
, 4, 1, do_md5sum
,
51 "compute MD5 message digest",
52 "address count [[*]sum]\n"
53 " - compute MD5 message digest [save to sum]"
55 #endif /* IS_ENABLED(CONFIG_MD5SUM_VERIFY) */