aboutsummaryrefslogtreecommitdiff
path: root/src/openpgp/hash.h
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2020-06-04 01:18:34 +0000
committerxiphon <xiphon@protonmail.com>2020-06-19 21:53:47 +0000
commit1e7d8293cbacec97e4fbc9f08b8401cc6eaa6900 (patch)
tree66fe5aa41ddcd2172ee4ce829f3820e11f9d6935 /src/openpgp/hash.h
parent8354c251c5ba5b1b90598444d2a991f8aaaabd5a (diff)
downloadmonzero-gui-1e7d8293cbacec97e4fbc9f08b8401cc6eaa6900.tar.gz
monzero-gui-1e7d8293cbacec97e4fbc9f08b8401cc6eaa6900.tar.xz
monzero-gui-1e7d8293cbacec97e4fbc9f08b8401cc6eaa6900.zip
openpgp: fix gcc 5.4.0 compilation
Diffstat (limited to 'src/openpgp/hash.h')
-rw-r--r--src/openpgp/hash.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/openpgp/hash.h b/src/openpgp/hash.h
index 0952c602..4f69851b 100644
--- a/src/openpgp/hash.h
+++ b/src/openpgp/hash.h
@@ -48,10 +48,10 @@ public:
hash &operator=(const hash &) = delete;
hash(uint8_t algorithm)
- : algorithm(algorithm)
+ : algo(algorithm)
, consumed(0)
{
- if (gcry_md_open(&md, algorithm, 0) != GPG_ERR_NO_ERROR)
+ if (gcry_md_open(&md, algo, 0) != GPG_ERR_NO_ERROR)
{
throw std::runtime_error("failed to create message digest object");
}
@@ -83,8 +83,8 @@ public:
std::vector<uint8_t> finish() const
{
- std::vector<uint8_t> result(gcry_md_get_algo_dlen(algorithm));
- const void *digest = gcry_md_read(md, algorithm);
+ std::vector<uint8_t> result(gcry_md_get_algo_dlen(algo));
+ const void *digest = gcry_md_read(md, algo);
if (digest == nullptr)
{
throw std::runtime_error("failed to read the digest");
@@ -99,7 +99,7 @@ public:
}
private:
- const uint8_t algorithm;
+ const uint8_t algo;
gcry_md_hd_t md;
size_t consumed;
};