Minor edits
This commit is contained in:
parent
4e1f2daa0d
commit
7478876271
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue