diff options
Diffstat (limited to 'libhashsum_init_shake256_hasher.3')
-rw-r--r-- | libhashsum_init_shake256_hasher.3 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libhashsum_init_shake256_hasher.3 b/libhashsum_init_shake256_hasher.3 index a38f405..3de4501 100644 --- a/libhashsum_init_shake256_hasher.3 +++ b/libhashsum_init_shake256_hasher.3 @@ -13,6 +13,8 @@ libhashsum_init_shake256_hasher - initialise state for SHAKE256 hashing size_t \fIhash_size\fP; unsigned char *\fIhash_output\fP; unsigned char \fIsupports_non_whole_bytes\fP; + unsigned char \fIstandard_partial_byte_input_encoding\fP; + unsigned char \fIstandard_partial_byte_output_encoding\fP; size_t (*\fIprocess\fP)(struct libhashsum_hasher *\fPthis\fP, const void *\fPdata\fP, size_t \fPbytes\fP); int (*\fIfinalise_const\fP)(struct libhashsum_hasher *\fPthis\fP, const void *\fPdata\fP, size_t \fPbytes\fP, unsigned \fPextra_bits\fP); int (*\fIfinalise\fP)(struct libhashsum_hasher *\fPthis\fP, void *\fPdata\fP, size_t \fPbytes\fP, unsigned \fPextra_bits\fP, size_t \fPsize\fP); @@ -269,6 +271,36 @@ Insufficient memory available. .I hashbits is too large. +.SH EXTENDED DESCRIPTION +libhashsum has normalises the all implemented hash +functions to always use the least significant bits +in non-whole octets, however each hash function has +its unstandarded. To make it easier to create an +application the use the same encoding of partial +octets as other application using any particular +hash function, +.B struct libhashsum_hasher +contains two fields: +.I standard_partial_byte_input_encoding +and +.IR standard_partial_byte_output_encoding ; +which are merely informtional. They are not set to +specify how libhashsum expects and encodes non-whole +octets, but rather specify how partial bytes are +encoded in the reference implementation or +specification of a hash function. +.PP +SHAKE256 supports non-whole octet both in its +input and its output, and in its standard uses +the least significant bits of non-whole octets +both in the input and in the output, thus +.I this->standard_partial_byte_input_encoding +and +.I this->standard_partial_byte_output_encoding +will both be set to +.IR LIBHASHSUM_LEAST_SIGNIFICANT , +which the same behaviour as libhashsum implements. + .SH HISTORY libhashsum 1.0. |