Skip to content

Commit

Permalink
Use {ENC,OUT}_CIPHERTEXT_SIZE constants in `zcash_primitives::trans…
Browse files Browse the repository at this point in the history
…action::components::sapling`.

Signed-off-by: Daira Emma Hopwood <[email protected]>
  • Loading branch information
daira committed Nov 10, 2023
1 parent e5bdc72 commit e32cf8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zcash_primitives/src/transaction/components/sapling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use ff::PrimeField;
use std::io::{self, Read, Write};

use zcash_encoding::{Array, CompactSize, Vector};
use zcash_note_encryption::EphemeralKeyBytes;
use zcash_note_encryption::{EphemeralKeyBytes, ENC_CIPHERTEXT_SIZE, OUT_CIPHERTEXT_SIZE};

use crate::{
sapling::{
Expand Down Expand Up @@ -172,8 +172,8 @@ fn read_output_v4<R: Read>(mut reader: &mut R) -> io::Result<OutputDescription<G
let mut ephemeral_key = EphemeralKeyBytes([0u8; 32]);
reader.read_exact(&mut ephemeral_key.0)?;

let mut enc_ciphertext = [0u8; 580];
let mut out_ciphertext = [0u8; 80];
let mut enc_ciphertext = [0u8; ENC_CIPHERTEXT_SIZE];
let mut out_ciphertext = [0u8; OUT_CIPHERTEXT_SIZE];
reader.read_exact(&mut enc_ciphertext)?;
reader.read_exact(&mut out_ciphertext)?;

Expand Down

0 comments on commit e32cf8b

Please sign in to comment.