Conversation
…iphertext These changes were discussed and suggested in PR zcash_note_encryption#2
…constant definitions from zcash_note_encryption to here
PaulLaux
reviewed
Aug 13, 2024
src/bundle.rs
Outdated
|
|
||
| /// Returns the encrypted note ciphertext. | ||
| pub fn enc_ciphertext(&self) -> &[u8; ENC_CIPHERTEXT_SIZE] { | ||
| pub fn enc_ciphertext(&self) -> &<SaplingDomain as Domain>::NoteCiphertextBytes { |
There was a problem hiding this comment.
let's stick to simply
/// Returns the encrypted note ciphertext.
pub fn enc_ciphertext(&self) -> &NoteBytesData<{ ENC_CIPHERTEXT_SIZE }> {
&self.enc_ciphertext
}
src/bundle.rs
Outdated
|
|
||
| fn enc_ciphertext(&self) -> Option<<SaplingDomain as Domain>::NoteCiphertextBytes> { | ||
| Some(NoteBytesData(self.enc_ciphertext)) | ||
| fn enc_ciphertext(&self) -> Option<&<SaplingDomain as Domain>::NoteCiphertextBytes> { |
There was a problem hiding this comment.
fn enc_ciphertext(&self) -> Option<&NoteBytesData<{ ENC_CIPHERTEXT_SIZE }>> {
There was a problem hiding this comment.
same for row 442:
fn enc_ciphertext_compact(&self) -> NoteBytesData<{ COMPACT_NOTE_SIZE }> {
src/note_encryption.rs
Outdated
| } | ||
|
|
||
| fn enc_ciphertext(&self) -> Option<<SaplingDomain as Domain>::NoteCiphertextBytes> { | ||
| fn enc_ciphertext(&self) -> Option<&<SaplingDomain as Domain>::NoteCiphertextBytes> { |
PaulLaux
approved these changes
Aug 19, 2024
PaulLaux
left a comment
There was a problem hiding this comment.
Please make sure we have the librustzcash required changes as well
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the
ShieldedOutputimplementation andOutputDescriptionstruct to align with the recent changes in thezcash_note_encryptioncrate. Specifically, theenc_ciphertextmethod now returns a reference instead of a copy. Also, it changedenc_ciphertextstorage inOutputDescriptiontoNoteBytesData.This change was discussed and suggested in PR zcash/zcash_note_encryption#2 review.