summaryrefslogtreecommitdiff
path: root/include/sha256.h
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-07-07 09:51:25 +0200
committerStefan Roese <sr@denx.de>2008-07-07 09:51:25 +0200
commit7c6237b3e2f2ee0098897da39b79aff4642b8946 (patch)
treed768b7851bb688f543da0a3ed50c927a2bde2804 /include/sha256.h
parentdd1c5523d6f44e842e69f2fcb50788c6060eab86 (diff)
parentc956717ab25c962ef49d49064dfc73f4edcba1fb (diff)
downloadu-boot-imx-7c6237b3e2f2ee0098897da39b79aff4642b8946.zip
u-boot-imx-7c6237b3e2f2ee0098897da39b79aff4642b8946.tar.gz
u-boot-imx-7c6237b3e2f2ee0098897da39b79aff4642b8946.tar.bz2
Merge branch 'master' of /home/stefan/git/u-boot/u-boot
Diffstat (limited to 'include/sha256.h')
-rw-r--r--include/sha256.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/sha256.h b/include/sha256.h
new file mode 100644
index 0000000..e38ea89
--- /dev/null
+++ b/include/sha256.h
@@ -0,0 +1,16 @@
+#ifndef _SHA256_H
+#define _SHA256_H
+
+#define SHA256_SUM_LEN 32
+
+typedef struct {
+ uint32_t total[2];
+ uint32_t state[8];
+ uint8_t buffer[64];
+} sha256_context;
+
+void sha256_starts(sha256_context * ctx);
+void sha256_update(sha256_context * ctx, uint8_t * input, uint32_t length);
+void sha256_finish(sha256_context * ctx, uint8_t digest[SHA256_SUM_LEN]);
+
+#endif /* _SHA256_H */