summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordbear496 <70439542+dbear496@users.noreply.github.com>2024-09-09 23:42:52 -0400
committerdbear496 <70439542+dbear496@users.noreply.github.com>2024-09-13 08:34:22 -0400
commitad93c185644cfcb14fe4a673e74a0cb5c954a4b4 (patch)
tree9925d69a7e32538788fca09b9a6e006ca468c50d /src
parent6d61583a7759d2fab5aacc0c2475e4d2a7d7898f (diff)
downloadfork-ledger-ad93c185644cfcb14fe4a673e74a0cb5c954a4b4.tar.gz
fork-ledger-ad93c185644cfcb14fe4a673e74a0cb5c954a4b4.tar.bz2
fork-ledger-ad93c185644cfcb14fe4a673e74a0cb5c954a4b4.zip
update to Boost 1.86.0
fixes #2378
Diffstat (limited to 'src')
-rw-r--r--src/filters.cc4
-rw-r--r--src/utils.h12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/filters.cc b/src/filters.cc
index b5b7fb19..eb397232 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -238,7 +238,7 @@ void anonymize_posts::render_commodity(amount_t& amt)
void anonymize_posts::operator()(post_t& post)
{
boost::uuids::detail::sha1 sha;
- unsigned int message_digest[5];
+ unsigned char message_digest[20];
bool copy_xact_details = false;
if (last_xact != post.xact) {
@@ -1269,7 +1269,7 @@ void budget_posts::report_budget_items(const date_t& date)
foreach (pending_posts_list::iterator& i, posts_to_erase)
pending_posts.erase(i);
}
-
+
if (pending_posts.size() == 0)
return;
diff --git a/src/utils.h b/src/utils.h
index bc05ff4f..09dd0993 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -578,14 +578,14 @@ inline int peek_next_nonws(std::istream& in) {
*_p = '\0'; \
}
-inline string to_hex(unsigned int * message_digest, const int len = 1)
+inline string to_hex(unsigned char * message_digest, const int len = 4)
{
std::ostringstream buf;
- for(int i = 0; i < 5 ; i++) {
- buf.width(8);
+ for(int i = 0; i < 20 ; i++) {
+ buf.width(2);
buf.fill('0');
- buf << std::hex << message_digest[i];
+ buf << std::hex << (int)message_digest[i];
if (i + 1 >= len)
break; // only output the first LEN dwords
}
@@ -598,9 +598,9 @@ inline string sha1sum(const string& str)
sha.process_bytes(str.c_str(), str.length());
- unsigned int message_digest[5];
+ unsigned char message_digest[20];
sha.get_digest(message_digest);
- return to_hex(message_digest, 5);
+ return to_hex(message_digest, 20);
}
extern const string version;