* [U-Boot] [PATCH] md5: Export step-by-step API
@ 2012-07-20 13:34 Benoît Thébaudeau
2012-07-20 14:44 ` Mike Frysinger
2012-09-02 15:30 ` Wolfgang Denk
0 siblings, 2 replies; 5+ messages in thread
From: Benoît Thébaudeau @ 2012-07-20 13:34 UTC (permalink / raw)
To: u-boot
Export the MD5 step-by-step API so that it is possible for the lib users to
digest files by chunks. This is especially useful for very large files that
would not fit into the embedded RAM.
Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
---
.../include/u-boot/md5.h | 4 ++++
{u-boot-66714b1.orig => u-boot-66714b1}/lib/md5.c | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git u-boot-66714b1.orig/include/u-boot/md5.h u-boot-66714b1/include/u-boot/md5.h
index e09c16a..e5cb923 100644
--- u-boot-66714b1.orig/include/u-boot/md5.h
+++ u-boot-66714b1/include/u-boot/md5.h
@@ -17,6 +17,10 @@ struct MD5Context {
};
};
+void MD5Init(struct MD5Context *ctx);
+void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len);
+void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
+
/*
* Calculate and store in 'output' the MD5 digest of 'len' bytes at
* 'input'. 'output' must have enough space to hold 16 bytes.
diff --git u-boot-66714b1.orig/lib/md5.c u-boot-66714b1/lib/md5.c
index 2ae4a06..688b725 100644
--- u-boot-66714b1.orig/lib/md5.c
+++ u-boot-66714b1/lib/md5.c
@@ -55,7 +55,7 @@ byteReverse(unsigned char *buf, unsigned longs)
* Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
* initialization constants.
*/
-static void
+void
MD5Init(struct MD5Context *ctx)
{
ctx->buf[0] = 0x67452301;
@@ -71,7 +71,7 @@ MD5Init(struct MD5Context *ctx)
* Update context to reflect the concatenation of another buffer full
* of bytes.
*/
-static void
+void
MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
{
register __u32 t;
@@ -120,7 +120,7 @@ MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
* Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
-static void
+void
MD5Final(unsigned char digest[16], struct MD5Context *ctx)
{
unsigned int count;
^ permalink raw reply related [flat|nested] 5+ messages in thread* [U-Boot] [PATCH] md5: Export step-by-step API
2012-07-20 13:34 [U-Boot] [PATCH] md5: Export step-by-step API Benoît Thébaudeau
@ 2012-07-20 14:44 ` Mike Frysinger
2012-08-03 23:09 ` Benoît Thébaudeau
2012-09-02 15:30 ` Wolfgang Denk
1 sibling, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2012-07-20 14:44 UTC (permalink / raw)
To: u-boot
Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120720/183c7725/attachment.pgp>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] md5: Export step-by-step API
2012-07-20 14:44 ` Mike Frysinger
@ 2012-08-03 23:09 ` Benoît Thébaudeau
2012-08-10 14:40 ` Benoît Thébaudeau
0 siblings, 1 reply; 5+ messages in thread
From: Benoît Thébaudeau @ 2012-08-03 23:09 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
On Fri, Jul 20, 2012 at 04:44:03 PM, Mike Frysinger wrote:
> Acked-by: Mike Frysinger <vapier@gentoo.org>
> -mike
Can you apply it now that the merge window is open?
Thanks in advance.
Best regards,
Beno?t
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] md5: Export step-by-step API
2012-08-03 23:09 ` Benoît Thébaudeau
@ 2012-08-10 14:40 ` Benoît Thébaudeau
0 siblings, 0 replies; 5+ messages in thread
From: Benoît Thébaudeau @ 2012-08-10 14:40 UTC (permalink / raw)
To: u-boot
On Sat, Aug 4, 2012 at 01:09:02 AM, Beno?t Th?baudeau wrote:
> Dear Wolfgang Denk,
>
> On Fri, Jul 20, 2012 at 04:44:03 PM, Mike Frysinger wrote:
> > Acked-by: Mike Frysinger <vapier@gentoo.org>
> > -mike
>
> Can you apply it now that the merge window is open?
>
> Thanks in advance.
Can someone answer, please?
Best regards,
Beno?t
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] md5: Export step-by-step API
2012-07-20 13:34 [U-Boot] [PATCH] md5: Export step-by-step API Benoît Thébaudeau
2012-07-20 14:44 ` Mike Frysinger
@ 2012-09-02 15:30 ` Wolfgang Denk
1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2012-09-02 15:30 UTC (permalink / raw)
To: u-boot
Dear Beno?t Th?baudeau,
In message <1882962205.333751.1342791280043.JavaMail.root@advansee.com> you wrote:
> Export the MD5 step-by-step API so that it is possible for the lib users to
> digest files by chunks. This is especially useful for very large files that
> would not fit into the embedded RAM.
>
> Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
> Cc: Wolfgang Denk <wd@denx.de>
> ---
> .../include/u-boot/md5.h | 4 ++++
> {u-boot-66714b1.orig => u-boot-66714b1}/lib/md5.c | 6 +++---
> 2 files changed, 7 insertions(+), 3 deletions(-)
As is, there are no users for this code, and we avoid adding dead
code.
Please re-submit with the code that actually uses this feature.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When all else fails, read the instructions.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-02 15:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-20 13:34 [U-Boot] [PATCH] md5: Export step-by-step API Benoît Thébaudeau
2012-07-20 14:44 ` Mike Frysinger
2012-08-03 23:09 ` Benoît Thébaudeau
2012-08-10 14:40 ` Benoît Thébaudeau
2012-09-02 15:30 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox