
sha.pl -- SHA secure hashes
This library provides a lightweight implementation for computing SHA
secure hashes. A general secure hash interface is provided by
library(crypto), part of the ssl package.
sha_hash(+Data, -Hash, +Options) is detsha1 (default), sha224, sha256, sha384 or
sha512utf8. The
other meaningful value is octet, claiming that Data contains
raw bytes.
sha_new_ctx(-NewContext, +Options) is det
sha_hash_ctx(+OldContext, +Data, -NewContext, -Hash) is detThis predicate allows a SHA function to be computed in chunks, which may be important while working with Metalink (RFC 5854), BitTorrent or similar technologies, or simply with big files.
hmac_sha(+Key, +Data, -Hash, +Options) is det
file_sha1(+File, -SHA1:atom) is detsha1sum program found in many systems.
hash_atom(+HashCodes, -HexAtom) is det?- sha_hash('SWI-Prolog', Hash, []),
hash_atom(Hash, Hex).
Hash = [61, 128, 252, 38, 121, 69, 229, 85, 199|...],
Hex = '3d80fc267945e555c730403bd0ab0716e2a68c68'.