summaryrefslogtreecommitdiff
path: root/include/aes.h
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2014-03-05 19:59:52 +0100
committerTom Rini <trini@ti.com>2014-03-21 16:44:08 -0400
commita8a752c084031905940129f8a6ba303925e0fac9 (patch)
tree1a1eac4b3b6e06d449c8ef88c209e1d338631f09 /include/aes.h
parenta4223b746db5c2db2e1a1d4f0bb20e30484b1667 (diff)
env: Implement support for AES encryption into fw_* tools
Implement support for encrypting/decrypting the environment block into the tools/env/fw_* tools. The cipher used is AES 128 CBC and the implementation depends solely on components internal to U-Boot. To allow building against the internal AES library, the library did need minor adjustments to not include U-Boot's headers which are not wanted to be included and define missing types. Signed-off-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'include/aes.h')
-rw-r--r--include/aes.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/aes.h b/include/aes.h
index 4897e6faa05..ee0e6c275f1 100644
--- a/include/aes.h
+++ b/include/aes.h
@@ -8,6 +8,13 @@
#ifndef _AES_REF_H_
#define _AES_REF_H_
+#ifdef USE_HOSTCC
+/* Define compat stuff for use in fw_* tools. */
+typedef unsigned char u8;
+typedef unsigned int u32;
+#define debug(...) do {} while (0)
+#endif
+
/*
* AES encryption library, with small code size, supporting only 128-bit AES
*