2018-04-02 14:24:45 +02:00
|
|
|
/*
|
|
|
|
This file is part of TALER
|
|
|
|
Copyright (C) 2018 Taler Systems SA
|
|
|
|
|
|
|
|
TALER is free software; you can redistribute it and/or modify it under the
|
|
|
|
terms of the GNU General Public License as published by the Free Software
|
|
|
|
Foundation; either version 3, or (at your option) any later version.
|
|
|
|
|
|
|
|
TALER is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
|
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along with
|
|
|
|
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @file util/crypto_wire.c
|
|
|
|
* @brief functions for making and verifying /wire account signatures
|
|
|
|
* @author Christian Grothoff <christian@grothoff.org>
|
|
|
|
*/
|
|
|
|
#include "platform.h"
|
2021-10-25 18:02:27 +02:00
|
|
|
#include "taler_util.h"
|
2018-04-02 14:24:45 +02:00
|
|
|
#include "taler_signatures.h"
|
|
|
|
|
2018-10-06 15:05:06 +02:00
|
|
|
|
|
|
|
void
|
2020-01-19 17:03:19 +01:00
|
|
|
TALER_merchant_wire_signature_hash (const char *payto_uri,
|
2022-02-07 12:33:35 +01:00
|
|
|
const struct TALER_WireSaltP *salt,
|
2022-02-21 00:23:23 +01:00
|
|
|
struct TALER_MerchantWireHashP *hc)
|
2018-10-06 15:05:06 +02:00
|
|
|
{
|
|
|
|
GNUNET_assert (GNUNET_YES ==
|
|
|
|
GNUNET_CRYPTO_kdf (hc,
|
|
|
|
sizeof (*hc),
|
|
|
|
salt,
|
2021-10-09 16:11:04 +02:00
|
|
|
sizeof (*salt),
|
2020-01-19 17:03:19 +01:00
|
|
|
payto_uri,
|
|
|
|
strlen (payto_uri) + 1,
|
2018-10-06 15:05:06 +02:00
|
|
|
"merchant-wire-signature",
|
|
|
|
strlen ("merchant-wire-signature"),
|
|
|
|
NULL, 0));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-04-02 14:24:45 +02:00
|
|
|
/* end of crypto_wire.c */
|