| // SPDX-License-Identifier: GPL-2.0+ |
| * Copyright (c) 2012 The Chromium OS Authors. |
| * Joe Hershberger, National Instruments, joe.hershberger@ni.com |
| * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| static int do_hash(struct cmd_tbl *cmdtp, int flag, int argc, |
| int flags = HASH_FLAG_ENV; |
| #ifdef CONFIG_HASH_VERIFY |
| if (!strcmp(argv[1], "-v")) { |
| flags |= HASH_FLAG_VERIFY; |
| /* Move forward to 'algorithm' parameter */ |
| return hash_command(*argv, flags, cmdtp, flag, argc - 1, argv + 1); |
| #ifdef CONFIG_HASH_VERIFY |
| "compute hash message digest", |
| "algorithm address count [[*]hash_dest]\n" |
| " - compute message digest [save to env var / *address]" |
| #ifdef CONFIG_HASH_VERIFY |
| "\nhash -v algorithm address count [*]hash\n" |
| " - verify message digest of memory area to immediate value, \n" |