diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-08-17 14:45:46 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-08-17 14:46:08 +0200 |
commit | 6f2ee9eb3c3642147fe381976ffeb88d0c3288e5 (patch) | |
tree | 26a66a4d123c667aa88d2aa5595add21390d53a8 /src/revocation | |
parent | f6acda6d3299bda2e6ea6e38bef5cabfb01b8ab9 (diff) | |
download | gnunet-6f2ee9eb3c3642147fe381976ffeb88d0c3288e5.tar.gz gnunet-6f2ee9eb3c3642147fe381976ffeb88d0c3288e5.zip |
clean up GNUNET_CRYPTO_pow_hash API
Diffstat (limited to 'src/revocation')
-rw-r--r-- | src/revocation/revocation_api.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c index e0b195aa9..75cfd8761 100644 --- a/src/revocation/revocation_api.c +++ b/src/revocation/revocation_api.c | |||
@@ -103,6 +103,8 @@ struct GNUNET_REVOCATION_PowCalculationHandle | |||
103 | 103 | ||
104 | }; | 104 | }; |
105 | 105 | ||
106 | static struct GNUNET_CRYPTO_PowSalt salt = { "GnsRevocationPow" }; | ||
107 | |||
106 | /** | 108 | /** |
107 | * Generic error handler, called with the appropriate | 109 | * Generic error handler, called with the appropriate |
108 | * error code and the same closure specified at the creation of | 110 | * error code and the same closure specified at the creation of |
@@ -483,7 +485,7 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_REVOCATION_PowP *pow, | |||
483 | { | 485 | { |
484 | pow_val = GNUNET_ntohll (pow->pow[i]); | 486 | pow_val = GNUNET_ntohll (pow->pow[i]); |
485 | GNUNET_memcpy (buf, &pow->pow[i], sizeof(uint64_t)); | 487 | GNUNET_memcpy (buf, &pow->pow[i], sizeof(uint64_t)); |
486 | GNUNET_CRYPTO_pow_hash ("GnsRevocationPow", | 488 | GNUNET_CRYPTO_pow_hash (&salt, |
487 | buf, | 489 | buf, |
488 | sizeof(buf), | 490 | sizeof(buf), |
489 | &result); | 491 | &result); |
@@ -644,7 +646,7 @@ GNUNET_REVOCATION_pow_round (struct GNUNET_REVOCATION_PowCalculationHandle *pc) | |||
644 | GNUNET_memcpy (&buf[sizeof(uint64_t) * 2], | 646 | GNUNET_memcpy (&buf[sizeof(uint64_t) * 2], |
645 | &pc->pow->key, | 647 | &pc->pow->key, |
646 | sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)); | 648 | sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)); |
647 | GNUNET_CRYPTO_pow_hash ("GnsRevocationPow", | 649 | GNUNET_CRYPTO_pow_hash (&salt, |
648 | buf, | 650 | buf, |
649 | sizeof(buf), | 651 | sizeof(buf), |
650 | &result); | 652 | &result); |