3.5.4 Hashing incrementally
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog SSL Interface
        • library(crypto): Cryptography and authentication library
          • Hashes
            • Hashing incrementally
              • crypto_context_new/2
              • crypto_data_context/3
              • crypto_context_hash/2
              • crypto_open_hash_stream/3
              • crypto_stream_hash/2
Availability::- use_module(library(crypto)).(can be autoloaded)
Source[det]crypto_data_context(+Data, +Context0, -Context)
Context0 is an existing computation context, and Context is the new context after hashing Data in addition to the previously hashed data. Context0 may be produced by a prior invocation of either crypto_context_new/2 or crypto_data_context/3 itself.

This predicate allows a hash to be computed in chunks, which may be important while working with Metalink (RFC 5854), BitTorrent or similar technologies, or simply with big files.