summaryrefslogtreecommitdiffstats
path: root/crypto/internal.h
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2015-03-11 17:53:08 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-13 08:32:28 +0100
commit2f3c3f512b2ff5023a4177e167eb6b55055fe883 (patch)
tree3df19abcf2a21b3909037825bed82f723901a37e /crypto/internal.h
parent3a436924121456c1347acedac31c9e19b2893565 (diff)
downloadbarebox-2f3c3f512b2ff5023a4177e167eb6b55055fe883.tar.gz
barebox-2f3c3f512b2ff5023a4177e167eb6b55055fe883.tar.xz
digest: add HMAC support for md5, sha1, sha224, sha256, sha384, sha512
the hmac algo will be registered as hmac(%s) such as hmac(sha256) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'crypto/internal.h')
-rw-r--r--crypto/internal.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/crypto/internal.h b/crypto/internal.h
new file mode 100644
index 0000000000..cc409d8d21
--- /dev/null
+++ b/crypto/internal.h
@@ -0,0 +1,15 @@
+/*
+ * (C) Copyright 2015 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * GPL v2 only
+ */
+
+#ifdef CONFIG_DIGEST_HMAC
+int digest_hmac_register(struct digest_algo *algo, unsigned int pad_length);
+#else
+static inline int digest_hmac_register(struct digest_algo *algo,
+ unsigned int pad_length)
+{
+ return 0;
+}
+#endif