Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
**/*.rs.bk
Cargo.lock
/.idea

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary, just add it to your .git/info/exclude file locally

16 changes: 8 additions & 8 deletions src/transcript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl Transcript {
/// **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.
pub fn new(label: &'static [u8]) -> Transcript {
pub fn new(label: &[u8]) -> Transcript {
use crate::constants::MERLIN_PROTOCOL_LABEL;

#[cfg(feature = "debug-transcript")]
Expand All @@ -93,7 +93,7 @@ impl Transcript {
/// also appended to the transcript. See the [Transcript
/// Protocols](https://merlin.cool/use/protocol.html) section of
/// the Merlin website for details on labels.
pub fn append_message(&mut self, label: &'static [u8], message: &[u8]) {
pub fn append_message(&mut self, label: &[u8], message: &[u8]) {
let data_len = encode_usize_as_u32(message.len());
self.strobe.meta_ad(label, false);
self.strobe.meta_ad(&data_len, true);
Expand Down Expand Up @@ -137,7 +137,7 @@ impl Transcript {
/// This is intended to avoid any possible confusion between the
/// transcript-level messages and protocol-level commitments.
#[deprecated(since = "1.1.0", note = "renamed to append_message for clarity.")]
pub fn commit_bytes(&mut self, label: &'static [u8], message: &[u8]) {
pub fn commit_bytes(&mut self, label: &[u8], message: &[u8]) {
self.append_message(label, message);
}

Expand All @@ -152,7 +152,7 @@ impl Transcript {
///
/// Calls `append_message` with the 8-byte little-endian encoding
/// of `x`.
pub fn append_u64(&mut self, label: &'static [u8], x: u64) {
pub fn append_u64(&mut self, label: &[u8], x: u64) {
self.append_message(label, &encode_u64(x));
}

Expand All @@ -162,7 +162,7 @@ impl Transcript {
/// This is intended to avoid any possible confusion between the
/// transcript-level messages and protocol-level commitments.
#[deprecated(since = "1.1.0", note = "renamed to append_u64 for clarity.")]
pub fn commit_u64(&mut self, label: &'static [u8], x: u64) {
pub fn commit_u64(&mut self, label: &[u8], x: u64) {
self.append_u64(label, x);
}

Expand All @@ -172,7 +172,7 @@ impl Transcript {
/// also appended to the transcript. See the [Transcript
/// Protocols](https://merlin.cool/use/protocol.html) section of
/// the Merlin website for details on labels.
pub fn challenge_bytes(&mut self, label: &'static [u8], dest: &mut [u8]) {
pub fn challenge_bytes(&mut self, label: &[u8], dest: &mut [u8]) {
let data_len = encode_usize_as_u32(dest.len());
self.strobe.meta_ad(label, false);
self.strobe.meta_ad(&data_len, true);
Expand Down Expand Up @@ -288,7 +288,7 @@ impl TranscriptRngBuilder {
/// The `label` parameter is metadata about `witness`.
pub fn rekey_with_witness_bytes(
mut self,
label: &'static [u8],
label: &[u8],
witness: &[u8],
) -> TranscriptRngBuilder {
let witness_len = encode_usize_as_u32(witness.len());
Expand All @@ -310,7 +310,7 @@ impl TranscriptRngBuilder {
)]
pub fn commit_witness_bytes(
self,
label: &'static [u8],
label: &[u8],
witness: &[u8],
) -> TranscriptRngBuilder {
self.rekey_with_witness_bytes(label, witness)
Expand Down