summaryrefslogtreecommitdiffstats
path: root/chksum.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-08-23 23:06:09 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-08-23 23:06:09 -0700
commit8a10829e5e35e5b0721260e0a7b31554ec21d766 (patch)
tree037c9464dc75ff36bbfadd0c2f1117fa60b28d75 /chksum.h
parent27a722e96f281974e9f49887e9470422dcb1da91 (diff)
downloadtxr-8a10829e5e35e5b0721260e0a7b31554ec21d766.tar.gz
txr-8a10829e5e35e5b0721260e0a7b31554ec21d766.tar.bz2
txr-8a10829e5e35e5b0721260e0a7b31554ec21d766.zip
New state-object-based sha256 and md5 digesting.
* chksum.c (sha256_ctx_s, md5_ctx_s): New symbol variables. (sha256_ops, md5_ops): New static structs. (sha256_begin, sha256_hash, sha256_end, md5_begin, md5_hash, md5_end): New functions. (chksum_init): New symbol variables initialized; sha256-begin, sha256-hash, sha256-end, md5-begin, md5-hash, md5-end intrinsics registered. * chksum.h (sha256_begin, sha256_hash, sha256_end, md5_begin, md5_hash, md5_end): Declared. * txr.1: Documented.
Diffstat (limited to 'chksum.h')
-rw-r--r--chksum.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/chksum.h b/chksum.h
index 089d784e..6c5f1312 100644
--- a/chksum.h
+++ b/chksum.h
@@ -27,8 +27,14 @@
val sha256_stream(val stream, val nbytes, val buf);
val sha256(val obj, val buf);
+val sha256_begin(void);
+val sha256_hash(val ctx, val obj);
+val sha256_end(val ctx, val buf);
val crc32_stream(val stream, val nbytes);
val crc32(val obj);
val md5_stream(val stream, val nbytes, val buf);
val md5(val obj, val buf_in);
+val md5_begin(void);
+val md5_hash(val ctx, val obj);
+val md5_end(val ctx, val buf);
void chksum_init(void);