| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* chksum.c (crc32_stream): use iobuf_get to obtain the I/O
buffer, and iobuf_put to recycle it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* chksum.c (sha256_stream_impl): New static function, formed
out of bulk of sha256_stream. Takes a pointer to a buffer
where the digest is stored.
(sha256_ensure_buf): New static function.
(sha256_stream): Take buf argument; use sha256_ensure_buf to
allocate a buffer if necessary, and to obtain the low-level
buffer pointer. Implementation moved into sha256_stream_impl.
(sha256_buf, sha256_str): Take pointer to digest buffer; don't
allocate a buf object, don't return anything.
(sha256): Take buf argument; use sha256_ensure_buf to
allocate a buffer if necessary, and to obtain the low-level
buffer pointer, which is passed to sha256_buf and sha256_str.
(chksum_init): Update registrations of intrinsics with new
optional parameters.
* chksum.h (sha256_stream, sha256): Declarations updated.
* txr.1: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* chksum.c (sha256_stream): Use iobuf_get and iobuf_put.
* gc.c (gc): Do not mark the list of recycled buffers; just
consider them to be garbage and clear the list, like we do
with recycled conses via rcyc_empty.
* stream.c (iobuf_free_list): New static variable.
(iobuf_get, iobuf_put, iobuf_list_empty): New functions.
* stream.h (iobuf_get, iobuf_put, iobuf_list_empty): Declared.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (OBJS): Add chksums/crc32.o.
* chksum.c (crc32_stream, crc32): New functions.
(chksum_init): Register crc32-stream and crc32 intrinsic
functions.
* chksums/crc32.c, chksums/crc32.h: New files.
* txr.1: Documented.
|
|
* chksum.c, chksum.h, chksums/sha256.c, chksums/sha256.h: New files.
* lib.c (init): Call chksum_init.
* txr.1: Documented.
* LICENSE: Add SHA-256 copyright notice.
|