decode_ringct modified

master
moneroexamples 8 years ago
parent 69d81a0949
commit 68a53d582b

@ -719,22 +719,22 @@ decode_ringct(const rct::rctSig& rv,
rct::key & mask, rct::key & mask,
uint64_t & amount) uint64_t & amount)
{ {
crypto::key_derivation derivation; try
{
crypto::key_derivation derivation;
bool r = crypto::generate_key_derivation(pub, sec, derivation); bool r = crypto::generate_key_derivation(pub, sec, derivation);
if (!r) if (!r)
{ {
cerr <<"Failed to generate key derivation to decode rct output " << i << endl; cerr <<"Failed to generate key derivation to decode rct output " << i << endl;
return false; return false;
} }
crypto::secret_key scalar1; crypto::secret_key scalar1;
crypto::derivation_to_scalar(derivation, i, scalar1); crypto::derivation_to_scalar(derivation, i, scalar1);
try
{
switch (rv.type) switch (rv.type)
{ {
case rct::RCTTypeSimple: case rct::RCTTypeSimple:

Loading…
Cancel
Save