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/xact.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/xact.h') diff --git a/src/xact.h b/src/xact.h index 4882acd2..4c6fcd73 100644 --- a/src/xact.h +++ b/src/xact.h @@ -127,6 +127,8 @@ public: const string& name); virtual bool valid() const; + + virtual string hash(string nonce) const; }; class auto_xact_t : public xact_base_t -- cgit v1.2.3