From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 5/5] command/digest: add sha224 support
Date: Sat, 8 Oct 2011 16:41:59 +0200 [thread overview]
Message-ID: <1318084919-3984-5-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1318084919-3984-1-git-send-email-plagnioj@jcrosoft.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
commands/Kconfig | 6 ++++++
commands/digest.c | 20 ++++++++++++++++++++
2 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/commands/Kconfig b/commands/Kconfig
index 39bdb0f..095c1b2 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -252,6 +252,12 @@ config CMD_SHA256SUM
select SHA256
prompt "sha256sum"
+config CMD_SHA224SUM
+ tristate
+ select CMD_DIGEST
+ select SHA224
+ prompt "sha224sum"
+
config CMD_MTEST
tristate
prompt "mtest"
diff --git a/commands/digest.c b/commands/digest.c
index 1fbffb6..fbeadf9 100644
--- a/commands/digest.c
+++ b/commands/digest.c
@@ -116,6 +116,26 @@ BAREBOX_CMD_END
#endif /* CMD_CMD_SHA1SUM */
+#ifdef CONFIG_CMD_SHA224SUM
+
+static int do_sha224(struct command *cmdtp, int argc, char *argv[])
+{
+ return do_digest("sha224", argc, argv);
+}
+
+BAREBOX_CMD_HELP_START(sha224sum)
+BAREBOX_CMD_HELP_USAGE("sha224sum [[FILE] [AREA]]...\n")
+BAREBOX_CMD_HELP_SHORT("Calculate a sha224 checksum of a memory area.\n")
+BAREBOX_CMD_HELP_END
+
+BAREBOX_CMD_START(sha224sum)
+ .cmd = do_sha224,
+ .usage = "sha224 checksum calculation",
+ BAREBOX_CMD_HELP(cmd_sha224sum_help)
+BAREBOX_CMD_END
+
+#endif /* CMD_CMD_SHA224SUM */
+
#ifdef CONFIG_CMD_SHA256SUM
static int do_sha256(struct command *cmdtp, int argc, char *argv[])
--
1.7.6.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2011-10-08 15:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-08 14:41 [PATCH 1/5] move digest to crypto/ Jean-Christophe PLAGNIOL-VILLARD
2011-10-08 14:41 ` [PATCH 2/5] digest: factorise file digest to common/digest.c Jean-Christophe PLAGNIOL-VILLARD
2011-10-08 14:41 ` [PATCH 3/5] sha1: drop never used sha1_hmac Jean-Christophe PLAGNIOL-VILLARD
2011-10-09 9:38 ` Sascha Hauer
2011-10-10 18:10 ` Jean-Christophe PLAGNIOL-VILLARD
2011-10-12 6:53 ` Sascha Hauer
2011-10-08 14:41 ` [PATCH 4/5] crypto: add sha224 support Jean-Christophe PLAGNIOL-VILLARD
2011-10-08 14:41 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1318084919-3984-5-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox