diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-02-07 13:41:55 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-02-07 13:41:55 +0100 |
commit | b84fb618c3c0f7492f609949f5202c75882d7b68 (patch) | |
tree | c36bad8f6b304f27582e0006f7a4a123c41f653b /src/util/denom.c | |
parent | 169d6843420df99dfcfb8089d03fc5c9bf68e8ef (diff) | |
download | exchange-b84fb618c3c0f7492f609949f5202c75882d7b68.tar.xz |
fix refreshes_reveal FTBFS
Diffstat (limited to 'src/util/denom.c')
-rw-r--r-- | src/util/denom.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/util/denom.c b/src/util/denom.c index caaa4f4e8..0c1f99225 100644 --- a/src/util/denom.c +++ b/src/util/denom.c @@ -691,4 +691,36 @@ TALER_blinded_denom_sig_cmp ( } +void +TALER_blinded_planchet_hash (const struct TALER_BlindedPlanchet *bp, + struct GNUNET_HashContext *hash_context) +{ + uint32_t cipher = htonl (bp->cipher); + + GNUNET_CRYPTO_hash_context_read (hash_context, + &cipher, + sizeof (cipher)); + switch (bp->cipher) + { + case TALER_DENOMINATION_INVALID: + break; + case TALER_DENOMINATION_RSA: + GNUNET_CRYPTO_hash_context_read ( + hash_context, + bp->details.rsa_blinded_planchet.blinded_msg, + bp->details.rsa_blinded_planchet.blinded_msg_size); + break; + case TALER_DENOMINATION_CS: + GNUNET_CRYPTO_hash_context_read ( + hash_context, + &bp->details.cs_blinded_planchet, + sizeof (bp->details.cs_blinded_planchet)); + break; + default: + GNUNET_assert (0); + break; + } +} + + /* end of denom.c */ |