Skip to content

Commit 616073c

Browse files
committed
Update to zcash/zcash_note_encryption@1dbc8b2f7b96519706ca2ea8322dcfeea76eef3e
This adapts the `zcash_note_encryption::ShieldedOutput` impl's provided by this crate to include implementations of the newly added `cmstar()` method.
1 parent fcb14de commit 616073c

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

Cargo.lock

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,6 @@ debug = true
106106

107107
[profile.bench]
108108
debug = true
109+
110+
[patch.crates-io]
111+
zcash_note_encryption = { git = "https://[email protected]/zcash/zcash_note_encryption", rev = "1dbc8b2f7b96519706ca2ea8322dcfeea76eef3e" }

src/note_encryption.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ impl<T> ShieldedOutput<OrchardDomain, ENC_CIPHERTEXT_SIZE> for Action<T> {
265265
EphemeralKeyBytes(self.encrypted_note().epk_bytes)
266266
}
267267

268-
fn cmstar_bytes(&self) -> [u8; 32] {
269-
self.cmx().to_bytes()
268+
fn cmstar(&self) -> &<OrchardDomain as Domain>::ExtractedCommitment {
269+
self.cmx()
270270
}
271271

272272
fn enc_ciphertext(&self) -> &[u8; ENC_CIPHERTEXT_SIZE] {
@@ -279,8 +279,8 @@ impl ShieldedOutput<OrchardDomain, ENC_CIPHERTEXT_SIZE> for crate::pczt::Action
279279
EphemeralKeyBytes(self.output().encrypted_note().epk_bytes)
280280
}
281281

282-
fn cmstar_bytes(&self) -> [u8; 32] {
283-
self.output().cmx().to_bytes()
282+
fn cmstar(&self) -> &<OrchardDomain as Domain>::ExtractedCommitment {
283+
self.output().cmx()
284284
}
285285

286286
fn enc_ciphertext(&self) -> &[u8; ENC_CIPHERTEXT_SIZE] {
@@ -321,8 +321,8 @@ impl ShieldedOutput<OrchardDomain, COMPACT_NOTE_SIZE> for CompactAction {
321321
EphemeralKeyBytes(self.ephemeral_key.0)
322322
}
323323

324-
fn cmstar_bytes(&self) -> [u8; 32] {
325-
self.cmx.to_bytes()
324+
fn cmstar(&self) -> &<OrchardDomain as Domain>::ExtractedCommitment {
325+
&self.cmx
326326
}
327327

328328
fn enc_ciphertext(&self) -> &[u8; COMPACT_NOTE_SIZE] {

0 commit comments

Comments
 (0)