MCPcopy Create free account
hub / github.com/docknetwork/crypto / new

Method new

merlin/src/transcript.rs:74–93  ·  view source on GitHub ↗

Initialize a new transcript with the supplied `label`, which is used as a domain separator. # Note This function should be called by a proof library's API consumer (i.e., the application using the proof library), and not by the proof implementation**. See the [Passing Transcripts](https://merlin.cool/use/passing.html) section of the Merlin website for more details on why.

(label: &'static [u8])

Source from the content-addressed store, hash-verified

72 /// Transcripts](https://merlin.cool/use/passing.html) section of
73 /// the Merlin website for more details on why.
74 pub fn new(label: &'static [u8]) -> Transcript {
75 use crate::constants::MERLIN_PROTOCOL_LABEL;
76
77 #[cfg(feature = "debug-transcript")]
78 {
79 use std::str::from_utf8;
80 println!(
81 "Initialize STROBE-128({})\t# b\"{}\"",
82 hex::encode(MERLIN_PROTOCOL_LABEL),
83 from_utf8(MERLIN_PROTOCOL_LABEL).unwrap(),
84 );
85 }
86
87 let mut transcript = Transcript {
88 strobe: Strobe128::new(MERLIN_PROTOCOL_LABEL),
89 };
90 transcript.append_message(b"dom-sep", label);
91
92 transcript
93 }
94
95 /// Append a prover's `message` to the transcript.
96 ///

Callers

nothing calls this directly

Calls 1

append_messageMethod · 0.45

Tested by

no test coverage detected