From 8a10829e5e35e5b0721260e0a7b31554ec21d766 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 23 Aug 2019 23:06:09 -0700 Subject: 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. --- chksum.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'chksum.h') 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); -- cgit v1.2.3