object
hash_common_32
Auxiliary predicates for the hashes library 32-bit algorithms.
logtalk_load(hashes(loader))static, context_switching_callsPublic predicates
word32_hex/2
Converts a 32-bit word into an 8-digit lowercase hexadecimal atom.
staticword32_hex(Word,Hex)word32_hex(+integer,-atom) - onebytes_hex/2
Converts a list of bytes into a lowercase hexadecimal atom.
staticbytes_hex(Bytes,Hex)bytes_hex(+list(integer),-atom) - onemask32/1
Returns the 32-bit mask value.
staticmask32(Mask)mask32(-integer) - oneadd32/3
Adds two integers modulo 2^32.
staticadd32(A,B,Sum)add32(+integer,+integer,-integer) - oneadd32/4
Adds three integers modulo 2^32.
staticadd32(A,B,C,Sum)add32(+integer,+integer,+integer,-integer) - oneadd32/5
Adds four integers modulo 2^32.
staticadd32(A,B,C,D,Sum)add32(+integer,+integer,+integer,+integer,-integer) - onemul32/3
Multiplies two integers modulo 2^32. Computed via 16-bit limb decomposition so that no intermediate result exceeds about 2**49, avoiding integer overflow errors on backends with bounded integer arithmetic.
staticmul32(A,B,Product)mul32(+integer,+integer,-integer) - onerol32/3
Rotates a 32-bit word left by the given number of bits.
staticrol32(Value,Shift,Rotated)rol32(+integer,+integer,-integer) - oneror32/3
Rotates a 32-bit word right by the given number of bits.
staticror32(Value,Shift,Rotated)ror32(+integer,+integer,-integer) - onepad_md/4
Pads a message using MD-style padding with a little-endian or big-endian length field.
staticpad_md(Endian,Bytes,LengthFieldBytes,PaddedBytes)pad_md(+little_big,+list(integer),+integer,-list(integer)) - onepad_md_tail/5
Pads the final, less-than-one-block tail of a message using MD-style padding given the total message length in bytes. For use when the message has already been consumed block by block during segmented/incremental hashing, so that only the unconsumed tail, and not the whole message, needs to be available.
staticpad_md_tail(Endian,TailBytes,TotalLength,LengthFieldBytes,PaddedBytes)pad_md_tail(+little_big,+list(integer),+integer,+integer,-list(integer)) - oneProtected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)