Stuck in the grind
This commit is contained in:
@@ -66,7 +66,7 @@ boost::optional<uint256> SaplingNote::nullifier(const SaplingFullViewingKey& vk,
|
||||
// Construct and populate SaplingNotePlaintext for a given note and memo.
|
||||
SaplingNotePlaintext::SaplingNotePlaintext(
|
||||
const SaplingNote& note,
|
||||
std::array<unsigned char, ZC_MEMO_SIZE> memo) : BaseNotePlaintext(note, memo)
|
||||
std::array<unsigned char, HUSH_MEMO_SIZE> memo) : BaseNotePlaintext(note, memo)
|
||||
{
|
||||
d = note.d;
|
||||
rcm = note.r;
|
||||
|
||||
@@ -48,15 +48,15 @@ public:
|
||||
class BaseNotePlaintext {
|
||||
protected:
|
||||
uint64_t value_ = 0;
|
||||
std::array<unsigned char, ZC_MEMO_SIZE> memo_;
|
||||
std::array<unsigned char, HUSH_MEMO_SIZE> memo_;
|
||||
public:
|
||||
BaseNotePlaintext() {}
|
||||
BaseNotePlaintext(const BaseNote& note, std::array<unsigned char, ZC_MEMO_SIZE> memo)
|
||||
BaseNotePlaintext(const BaseNote& note, std::array<unsigned char, HUSH_MEMO_SIZE> memo)
|
||||
: value_(note.value()), memo_(memo) {}
|
||||
virtual ~BaseNotePlaintext() {}
|
||||
|
||||
inline uint64_t value() const { return value_; }
|
||||
inline const std::array<unsigned char, ZC_MEMO_SIZE> & memo() const { return memo_; }
|
||||
inline const std::array<unsigned char, HUSH_MEMO_SIZE> & memo() const { return memo_; }
|
||||
};
|
||||
|
||||
typedef std::pair<SaplingEncCiphertext, SaplingNoteEncryption> SaplingNotePlaintextEncryptionResult;
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
SaplingNotePlaintext() {}
|
||||
|
||||
SaplingNotePlaintext(const SaplingNote& note, std::array<unsigned char, ZC_MEMO_SIZE> memo);
|
||||
SaplingNotePlaintext(const SaplingNote& note, std::array<unsigned char, HUSH_MEMO_SIZE> memo);
|
||||
|
||||
static boost::optional<SaplingNotePlaintext> decrypt(
|
||||
const SaplingEncCiphertext &ciphertext,
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
#define ZC_V_SIZE 8
|
||||
#define ZC_RHO_SIZE 32
|
||||
#define ZC_R_SIZE 32
|
||||
#define ZC_MEMO_SIZE 512
|
||||
#define HUSH_MEMO_SIZE 512
|
||||
#define ZC_DIVERSIFIER_SIZE 11
|
||||
#define ZC_JUBJUB_POINT_SIZE 32
|
||||
#define ZC_JUBJUB_SCALAR_SIZE 32
|
||||
|
||||
#define ZC_NOTEPLAINTEXT_SIZE (ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE)
|
||||
#define ZC_NOTEPLAINTEXT_SIZE (ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + HUSH_MEMO_SIZE)
|
||||
|
||||
#define ZC_SAPLING_ENCPLAINTEXT_SIZE (ZC_NOTEPLAINTEXT_LEADING + ZC_DIVERSIFIER_SIZE + ZC_V_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE)
|
||||
#define ZC_SAPLING_ENCPLAINTEXT_SIZE (ZC_NOTEPLAINTEXT_LEADING + ZC_DIVERSIFIER_SIZE + ZC_V_SIZE + ZC_R_SIZE + HUSH_MEMO_SIZE)
|
||||
#define ZC_SAPLING_OUTPLAINTEXT_SIZE (ZC_JUBJUB_POINT_SIZE + ZC_JUBJUB_SCALAR_SIZE)
|
||||
|
||||
#define ZC_SAPLING_ENCCIPHERTEXT_SIZE (ZC_SAPLING_ENCPLAINTEXT_SIZE + NOTEENCRYPTION_AUTH_BYTES)
|
||||
|
||||
Reference in New Issue
Block a user