diff options
author | stoffu <stoffu@protonmail.ch> | 2018-03-05 14:24:48 +0900 |
---|---|---|
committer | stoffu <stoffu@protonmail.ch> | 2018-03-14 21:00:06 +0900 |
commit | c9b38b4765a7eea11bb57b4fce1694c382c80936 (patch) | |
tree | 8e6057e827809809840f0c39467f563a4a9c1167 /src/crypto | |
parent | Merge pull request #3378 (diff) | |
download | monero-c9b38b4765a7eea11bb57b4fce1694c382c80936.tar.xz |
device: made function prototypes consistent with pre-#3303 codebase
Diffstat (limited to '')
-rw-r--r-- | src/crypto/crypto_device.cpp | 8 | ||||
-rw-r--r-- | src/cryptonote_basic/cryptonote_format_utils.cpp | 10 |
2 files changed, 5 insertions, 13 deletions
diff --git a/src/crypto/crypto_device.cpp b/src/crypto/crypto_device.cpp index 5536857c8..30831dced 100644 --- a/src/crypto/crypto_device.cpp +++ b/src/crypto/crypto_device.cpp @@ -35,15 +35,11 @@ namespace crypto { secret_key generate_keys(public_key &pub, secret_key &sec, const secret_key& recovery_key, bool recover, hw::device &hwdev) { - secret_key rng; - hwdev.generate_keys(pub, sec, recovery_key, recover, rng); - return rng; + return hwdev.generate_keys(pub, sec, recovery_key, recover); } secret_key generate_keys(public_key &pub, secret_key &sec, hw::device &hwdev) { - secret_key rng; - hwdev.generate_keys(pub, sec, secret_key(), false, rng); - return rng; + return hwdev.generate_keys(pub, sec, secret_key(), false); } diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp index a10772424..1c10423fa 100644 --- a/src/cryptonote_basic/cryptonote_format_utils.cpp +++ b/src/cryptonote_basic/cryptonote_format_utils.cpp @@ -185,9 +185,7 @@ namespace cryptonote } crypto::secret_key get_subaddress_secret_key(const crypto::secret_key& a, const subaddress_index& index, hw::device &hwdev) { - crypto::secret_key m; - hwdev.get_subaddress_secret_key(a, index, m); - return m; + return hwdev.get_subaddress_secret_key(a, index); } //--------------------------------------------------------------- @@ -232,9 +230,7 @@ namespace cryptonote std::vector<crypto::public_key> get_subaddress_spend_public_keys(const cryptonote::account_keys &keys, uint32_t account, uint32_t begin, uint32_t end, hw::device &hwdev) { - std::vector<crypto::public_key> pkeys; - hwdev.get_subaddress_spend_public_keys(keys, account, begin, end, pkeys); - return pkeys; + return hwdev.get_subaddress_spend_public_keys(keys, account, begin, end); } //--------------------------------------------------------------- @@ -282,7 +278,7 @@ namespace cryptonote } else { - hwdev.get_subaddress_secret_key(ack.m_view_secret_key, received_index, subaddr_sk); + subaddr_sk = hwdev.get_subaddress_secret_key(ack.m_view_secret_key, received_index); hwdev.sc_secret_add(scalar_step2, scalar_step1,subaddr_sk); } |