File "crypto"

This files provides a message digest. The predicate checksum_binary/2 computes a SHA-256 hash of a file. The input is read as a binary type Prolog file and the hash is returned as a binary Prolog atom. The predicate hex_encode/2 converts a binary atom consisting of codes in the range 0..255 into a ASCII hex representation atom.

The following crypto predicates are provided:

checksum_binary(A, B):
The predicate succeeds in B with the checksum of the file A.
hex_encode(A, B):
The predicate succeeds in B with hex encode of the A.

Kommentare