//cn_fast_hash for multisig purpose //This takes the outputs and commitments //and hashes them into a 32 byte sized key key cn_fast_hash(ctkeyV PC) { key rv = identity(); std::size_t l = (std::size_t)PC.size(); size_t i = 0, j = 0; vector<char> m(l * 64); for (i = 0 ; i < l ; i++) { memcpy(&m[i * 64], &PC[i].dest, 32); memcpy(&m[i * 64 + 32], &PC[i].mask, 32); } cn_fast_hash(rv, &m[0], 64*l); return rv; }
//cn_fast_hash for multisig purpose //This takes the outputs and commitments //and hashes them into a 32 byte sized key key cn_fast_hash(const ctkeyV &PC) { if (PC.empty()) return rct::hash2rct(crypto::cn_fast_hash("", 0)); key rv; cn_fast_hash(rv, &PC[0], 64*PC.size()); return rv; }