diff --git a/src/transcript.rs b/src/transcript.rs index 9973f0b..42e2013 100644 --- a/src/transcript.rs +++ b/src/transcript.rs @@ -332,6 +332,18 @@ impl TranscriptRngBuilder { self.strobe.meta_ad(b"rng", false); self.strobe.key(&random_bytes, false); + TranscriptRng { + strobe: self.strobe, + } + } + pub fn finalize_trng(mut self,trng: &[u8]) -> TranscriptRng + { + let mut random_bytes = [0u8; 32]; + random_bytes.copy_from_slice(&trng[..]); + + self.strobe.meta_ad(b"rng", false); + self.strobe.key(&random_bytes, false); + TranscriptRng { strobe: self.strobe, }