Browse Source

return when ciphertext empty

cl-refactor
subtly 10 years ago
parent
commit
29f9bf1dc6
  1. 4
      libdevcrypto/CryptoPP.cpp

4
libdevcrypto/CryptoPP.cpp

@ -53,6 +53,10 @@ void Secp256k1::decrypt(Secret const& _k, bytes& io_text)
CryptoPP::ECIES<CryptoPP::ECP>::Decryptor d;
initializeDLScheme(_k, d);
// todo: test ecies w/null plaintext or ciphertext of \0
if (!io_text.size())
return;
size_t clen = io_text.size();
bytes plain;
plain.resize(d.MaxPlaintextLength(io_text.size()));

Loading…
Cancel
Save