summaryrefslogtreecommitdiff
path: root/src/blob.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/blob.c')
-rw-r--r--src/blob.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/blob.c b/src/blob.c
index 3aa61c7..6f05dfe 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -4,7 +4,7 @@
* Copyright (C) 2008 Timo Teräs <timo.teras@iki.fi>
* All rights reserved.
*
- * This program is free software; you can redistribute it and/or modify it
+ * This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. See http://www.gnu.org/ for details.
*/
@@ -165,6 +165,15 @@ unsigned apk_blob_uint(apk_blob_t blob, int base)
return val;
}
+void apk_blob_csum(apk_blob_t blob, csum_t csum)
+{
+ csum_ctx_t ctx;
+
+ csum_init(&ctx);
+ csum_process(&ctx, blob.ptr, blob.len);
+ csum_finish(&ctx, csum);
+}
+
int apk_hexdump_parse(apk_blob_t to, apk_blob_t from)
{
int i;