Minor edits

This commit is contained in:
Sean Bowe 2018-07-11 15:48:41 -06:00
parent 4e1f2daa0d
commit 7478876271
2 changed files with 3 additions and 2 deletions

View File

@ -19,7 +19,7 @@ public:
} }
}; };
TEST(noteencryption, sapling_api) TEST(noteencryption, SaplingApi)
{ {
using namespace libzcash; using namespace libzcash;
@ -44,7 +44,7 @@ TEST(noteencryption, sapling_api)
} }
// Invalid diversifier // Invalid diversifier
ASSERT_FALSE(SaplingNoteEncryption::FromDiversifier({1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})); ASSERT_EQ(boost::none, SaplingNoteEncryption::FromDiversifier({1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}));
// Encrypt to pk_1 // Encrypt to pk_1
auto enc = *SaplingNoteEncryption::FromDiversifier(pk_1.d); auto enc = *SaplingNoteEncryption::FromDiversifier(pk_1.d);

View File

@ -24,6 +24,7 @@ typedef std::array<unsigned char, ZC_SAPLING_ENCPLAINTEXT_SIZE> SaplingEncPlaint
typedef std::array<unsigned char, ZC_SAPLING_OUTCIPHERTEXT_SIZE> SaplingOutCiphertext; typedef std::array<unsigned char, ZC_SAPLING_OUTCIPHERTEXT_SIZE> SaplingOutCiphertext;
typedef std::array<unsigned char, ZC_SAPLING_OUTPLAINTEXT_SIZE> SaplingOutPlaintext; typedef std::array<unsigned char, ZC_SAPLING_OUTPLAINTEXT_SIZE> SaplingOutPlaintext;
//! This is not a thread-safe API.
class SaplingNoteEncryption { class SaplingNoteEncryption {
protected: protected:
// Ephemeral public key // Ephemeral public key