mirror of
https://github.com/monero-project/monero.git
synced 2024-11-18 10:01:02 +00:00
ringct: pass vectors by const ref where possible
This commit is contained in:
parent
34fcfcd7cc
commit
ab002a1d97
2 changed files with 4 additions and 4 deletions
|
@ -367,7 +367,7 @@ namespace rct {
|
||||||
//cn_fast_hash for multisig purpose
|
//cn_fast_hash for multisig purpose
|
||||||
//This takes the outputs and commitments
|
//This takes the outputs and commitments
|
||||||
//and hashes them into a 32 byte sized key
|
//and hashes them into a 32 byte sized key
|
||||||
key cn_fast_hash(ctkeyV PC) {
|
key cn_fast_hash(const ctkeyV &PC) {
|
||||||
key rv = identity();
|
key rv = identity();
|
||||||
std::size_t l = (std::size_t)PC.size();
|
std::size_t l = (std::size_t)PC.size();
|
||||||
size_t i = 0, j = 0;
|
size_t i = 0, j = 0;
|
||||||
|
@ -380,7 +380,7 @@ namespace rct {
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
key hash_to_scalar(ctkeyV PC) {
|
key hash_to_scalar(const ctkeyV &PC) {
|
||||||
key rv = cn_fast_hash(PC);
|
key rv = cn_fast_hash(PC);
|
||||||
sc_reduce32(rv.bytes);
|
sc_reduce32(rv.bytes);
|
||||||
return rv;
|
return rv;
|
||||||
|
|
|
@ -149,8 +149,8 @@ namespace rct {
|
||||||
//for mg sigs
|
//for mg sigs
|
||||||
key cn_fast_hash128(const void * in);
|
key cn_fast_hash128(const void * in);
|
||||||
key hash_to_scalar128(const void * in);
|
key hash_to_scalar128(const void * in);
|
||||||
key cn_fast_hash(ctkeyV PC);
|
key cn_fast_hash(const ctkeyV &PC);
|
||||||
key hash_to_scalar(ctkeyV PC);
|
key hash_to_scalar(const ctkeyV &PC);
|
||||||
//for mg sigs
|
//for mg sigs
|
||||||
key cn_fast_hash(const keyV &keys);
|
key cn_fast_hash(const keyV &keys);
|
||||||
key hash_to_scalar(const keyV &keys);
|
key hash_to_scalar(const keyV &keys);
|
||||||
|
|
Loading…
Reference in a new issue