summaryrefslogtreecommitdiffstats
path: root/cadr.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-07-04 07:28:18 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-07-04 07:28:18 -0700
commitc7b508747347e8a17546140da64e5170b01e075e (patch)
tree857bb702a1171282afff5ae00d1a51b316fceea0 /cadr.c
parentf47ad62b88bcff263c3f14b3107968efffd8378a (diff)
downloadtxr-c7b508747347e8a17546140da64e5170b01e075e.tar.gz
txr-c7b508747347e8a17546140da64e5170b01e075e.tar.bz2
txr-c7b508747347e8a17546140da64e5170b01e075e.zip
sha256: allow application to specify digest buffer.
* 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.
Diffstat (limited to 'cadr.c')
0 files changed, 0 insertions, 0 deletions