object

# `hash_common_64`

Auxiliary predicates for the hashes library 64-bit algorithms.

Availability:
`logtalk_load(hashes(loader))`
Author: Paulo Moura
Version: 1:0:0
Date: 2026-04-04
Compilation flags:
`static, context_switching_calls`
Dependencies:
(none)
Remarks:
(none)
Inherited public predicates:
(none)

## Public predicates

### `word64_hex/2`

Converts a 64-bit word into a 16-digit lowercase hexadecimal atom.

Compilation flags:
`static`
Template:
`word64_hex(Word,Hex)`
Mode and number of proofs:
`word64_hex(+integer,-atom)` - `one`

### `mask64/1`

Returns the 64-bit mask value.

Compilation flags:
`static`
Template:
`mask64(Mask)`
Mode and number of proofs:
`mask64(-integer)` - `one`

### `add64/3`

Adds two integers modulo 2^64.

Compilation flags:
`static`
Template:
`add64(A,B,Sum)`
Mode and number of proofs:
`add64(+integer,+integer,-integer)` - `one`

### `mul64/3`

Multiplies two integers modulo 2^64.

Compilation flags:
`static`
Template:
`mul64(A,B,Product)`
Mode and number of proofs:
`mul64(+integer,+integer,-integer)` - `one`

### `rol64/3`

Rotates a 64-bit word left by the given number of bits.

Compilation flags:
`static`
Template:
`rol64(Value,Shift,Rotated)`
Mode and number of proofs:
`rol64(+integer,+integer,-integer)` - `one`

### `xor64/3`

Computes the bitwise exclusive-or of two integers modulo 2^64.

Compilation flags:
`static`
Template:
`xor64(A,B,Xor)`
Mode and number of proofs:
`xor64(+integer,+integer,-integer)` - `one`

### `or64/3`

Computes the bitwise disjunction of two integers modulo 2^64.

Compilation flags:
`static`
Template:
`or64(A,B,Or)`
Mode and number of proofs:
`or64(+integer,+integer,-integer)` - `one`

### `and64/3`

Computes the bitwise conjunction of two integers modulo 2^64.

Compilation flags:
`static`
Template:
`and64(A,B,And)`
Mode and number of proofs:
`and64(+integer,+integer,-integer)` - `one`

### `not64/2`

Computes the bitwise complement of an integer modulo 2^64.

Compilation flags:
`static`
Template:
`not64(Value,Complement)`
Mode and number of proofs:
`not64(+integer,-integer)` - `one`

### `shl64/3`

Shifts a 64-bit word left by the given number of bits and masks the result.

Compilation flags:
`static`
Template:
`shl64(Value,Shift,Shifted)`
Mode and number of proofs:
`shl64(+integer,+integer,-integer)` - `one`

### `shr64/3`

Shifts a 64-bit word right by the given number of bits after masking the input.

Compilation flags:
`static`
Template:
`shr64(Value,Shift,Shifted)`
Mode and number of proofs:
`shr64(+integer,+integer,-integer)` - `one`

### `integer_to_big_endian_bytes64/2`

Encodes a 64-bit word into eight bytes in big-endian order.

Compilation flags:
`static`
Template:
`integer_to_big_endian_bytes64(Integer,Bytes)`
Mode and number of proofs:
`integer_to_big_endian_bytes64(+integer,-list(integer))` - `one`

## Protected predicates

(none)

## Private predicates

(none)

## Operators

(none)