summaryrefslogtreecommitdiff
path: root/include/sha256.h
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-07-06 01:15:17 +0200
committerWolfgang Denk <wd@denx.de>2008-07-06 01:15:17 +0200
commitd86a0a6f7fe433787edf06aecba9fd6abfecab48 (patch)
tree005ba8a000e7bdcab42c1df6339bf7e51dcda2ca /include/sha256.h
parenta524e112b424c6843800ea2f19d3a8cf01d0aa94 (diff)
parentf492dd636fbbae529e17533995bc6e5813c007f6 (diff)
downloadu-boot-imx-d86a0a6f7fe433787edf06aecba9fd6abfecab48.zip
u-boot-imx-d86a0a6f7fe433787edf06aecba9fd6abfecab48.tar.gz
u-boot-imx-d86a0a6f7fe433787edf06aecba9fd6abfecab48.tar.bz2
Merge branch 'master' of ssh+git://mercury.denx.de/home/wd/git/u-boot/master
Conflicts: board/amirix/ap1000/serial.c board/exbitgen/exbitgen.c board/exbitgen/flash.c board/ml2/serial.c board/xilinx/ml300/serial.c Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'include/sha256.h')
-rwxr-xr-xinclude/sha256.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/sha256.h b/include/sha256.h
new file mode 100755
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 */