From b5c9b7ffd95b2934e503e8524ac0f571ed2b9f91 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 29 Aug 2019 06:58:27 -0700 Subject: sha256/md5: allow characters and byte values. * chksum.c (sha256_utf8_byte_callback, md5_utf8_byte_callback): New static functions. (sha256_hash, md5_hash): Support character and integer objects. * txr.1: Documented. --- txr.1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index b8b7c120..df165629 100644 --- a/txr.1 +++ b/txr.1 @@ -52411,8 +52411,9 @@ by including .meta obj into the digest calculation. The .meta obj -argument may be a character string, whose UTF-8 representation is digested, -or a buffer object, whose contents are digested. +argument may be: a character or character string, whose UTF-8 representation is +digested; a buffer object, whose contents are digested; or an integer, +representing a byte value in the range 0 to 255 included in the digest. The .code sha256-hash function may be called multiple times to include any mixture of @@ -52467,8 +52468,9 @@ by including .meta obj into the digest calculation. The .meta obj -argument may be a character string, whose UTF-8 representation is digested, -or a buffer object, whose contents are digested. +argument may be: a character or character string, whose UTF-8 representation is +digested; a buffer object, whose contents are digested; or an integer, +representing a byte value in the range 0 to 255 included in the digest. The .code md5-hash function may be called multiple times to include any mixture of -- cgit v1.2.3