From db0661dbb51e9082e47926c31e93bdc97b491bf9 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 22 Nov 2023 16:47:21 -0800 Subject: Add support for hash chaining to detect modifications in postings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The following details of a posting contribute to its hash: fullname of account string representation of amount Each posting hashes contributes to the transaction hash, which is compromised of: previous transaction’s hash (as encountered in parsing order) actual date optional auxiliary date optional code payee hashes of all postings Note that this means that changes in the “code” or any of the comments --- src/journal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/journal.h') diff --git a/src/journal.h b/src/journal.h index 06bcbd4f..d68618bf 100644 --- a/src/journal.h +++ b/src/journal.h @@ -184,7 +184,7 @@ public: return period_xacts.end(); } - std::size_t read(parse_context_stack_t& context); + std::size_t read(parse_context_stack_t& context, bool store_hashes); bool has_xdata(); void clear_xdata(); @@ -193,7 +193,7 @@ public: private: - std::size_t read_textual(parse_context_stack_t& context); + std::size_t read_textual(parse_context_stack_t& context, bool store_hashes); bool should_check_payees(); bool payee_not_registered(const string& name); -- cgit v1.2.3