From 17046ee716d79cc8c069cd4497a56ff10d770c74 Mon Sep 17 00:00:00 2001 From: alexeykoren <2365507+alexeykoren@users.noreply.github.com> Date: Mon, 20 May 2024 19:33:17 +0200 Subject: [PATCH] Bring back constants --- src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 89977ef..ab7b78d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -45,6 +45,16 @@ pub const MEMO_SIZE: usize = 512; /// The size of the authentication tag used for note encryption. pub const AEAD_TAG_SIZE: usize = 16; +/// The size of a compact note. +pub const COMPACT_NOTE_SIZE: usize = 1 + // version + 11 + // diversifier + 8 + // value + 32; // rseed (or rcm prior to ZIP 212) +/// The size of [`NotePlaintextBytes`]. +pub const NOTE_PLAINTEXT_SIZE: usize = COMPACT_NOTE_SIZE + 512; +/// The size of an encrypted note plaintext. +pub const ENC_CIPHERTEXT_SIZE: usize = NOTE_PLAINTEXT_SIZE + AEAD_TAG_SIZE; + /// The size of [`OutPlaintextBytes`]. pub const OUT_PLAINTEXT_SIZE: usize = 32 + // pk_d 32; // esk