Have Transcript::append_message take in AsRef<[u8]>, not &[u8]

Simplifies calling it.
This commit is contained in:
Luke Parker
2022-11-05 18:43:36 -04:00
parent 65df18d285
commit 8de465af87
20 changed files with 59 additions and 59 deletions

View File

@@ -93,8 +93,8 @@ impl Transcript for IetfTranscript {
fn domain_separate(&mut self, _: &[u8]) {}
fn append_message(&mut self, _: &'static [u8], message: &[u8]) {
self.0.extend(message);
fn append_message<M: AsRef<[u8]>>(&mut self, _: &'static [u8], message: M) {
self.0.extend(message.as_ref());
}
fn challenge(&mut self, _: &'static [u8]) -> Vec<u8> {