From 49019eaee270e880f4ae98dfd85923fe59393f9c Mon Sep 17 00:00:00 2001 From: jonesmarvin8 <83104039+jonesmarvin8@users.noreply.github.com> Date: Fri, 5 Sep 2025 20:48:11 -0400 Subject: [PATCH] Update nssa/core/src/commitment.rs Co-authored-by: Sergio Chouhy <41742639+schouhy@users.noreply.github.com> --- nssa/core/src/commitment.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nssa/core/src/commitment.rs b/nssa/core/src/commitment.rs index 760aa91..1eb8c98 100644 --- a/nssa/core/src/commitment.rs +++ b/nssa/core/src/commitment.rs @@ -8,8 +8,8 @@ use crate::{NullifierPublicKey, account::Account}; pub struct Commitment(pub(super) [u8; 32]); impl Commitment { - // Generates the commitment to a private account owned by user for npk: - // hash(npk || program_owner || balance || nonce || data) + /// Generates the commitment to a private account owned by user for npk: + /// SHA256(npk || program_owner || balance || nonce || data) pub fn new(npk: &NullifierPublicKey, account: &Account) -> Self { let mut bytes = Vec::new(); bytes.extend_from_slice(&npk.to_byte_array());