summaryrefslogtreecommitdiffstats
path: root/rbutil/mkamsboot/md5.h
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-10-30 00:13:29 +0000
committerDave Chapman <dave@dchapman.com>2008-10-30 00:13:29 +0000
commitc91d7873c79103f9e6ef00cedbec7ad9410c7666 (patch)
tree2f372cf9b19763446ce265d20d2f2307a2c0fac5 /rbutil/mkamsboot/md5.h
parente1b483848120507a909e95417e938324ed377bd5 (diff)
downloadrockbox-c91d7873c79103f9e6ef00cedbec7ad9410c7666.tar.gz
rockbox-c91d7873c79103f9e6ef00cedbec7ad9410c7666.tar.bz2
rockbox-c91d7873c79103f9e6ef00cedbec7ad9410c7666.zip
Add MD5 checksumming of the original firmware images - for extra safety, and also because some Fuze firmwares have the same ID (or what we thought was the ID) as the M200 firmwares. Plus a few minor cleanups.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18927 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/mkamsboot/md5.h')
-rw-r--r--rbutil/mkamsboot/md5.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/rbutil/mkamsboot/md5.h b/rbutil/mkamsboot/md5.h
new file mode 100644
index 0000000000..71fa395548
--- /dev/null
+++ b/rbutil/mkamsboot/md5.h
@@ -0,0 +1,25 @@
+#ifndef _MD5_H
+#define _MD5_H
+
+#ifndef uint8
+#define uint8 unsigned char
+#endif
+
+#ifndef uint32
+#define uint32 unsigned long int
+#endif
+
+typedef struct
+{
+ uint32 total[2];
+ uint32 state[4];
+ uint8 buffer[64];
+}
+md5_context;
+
+void md5_starts( md5_context *ctx );
+void md5_update( md5_context *ctx, uint8 *input, uint32 length );
+void md5_finish( md5_context *ctx, uint8 digest[16] );
+
+#endif /* md5.h */
+