From 921b2bfc3915f7cb526980298136161802888739 Mon Sep 17 00:00:00 2001 From: Katherine Watson Date: Sun, 16 Jun 2024 22:02:14 -0700 Subject: [PATCH] Fix comments in PublicBox impl to refer to PublicBox --- secret-memory/src/public.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/secret-memory/src/public.rs b/secret-memory/src/public.rs index 8d29eea..c06723f 100644 --- a/secret-memory/src/public.rs +++ b/secret-memory/src/public.rs @@ -285,31 +285,31 @@ pub struct PublicBox { } impl PublicBox { - /// Create a new [Public] from a byte slice + /// Create a new [PublicBox] from a byte slice pub fn from_slice(value: &[u8]) -> Self { copy_slice(value).to_this(Self::zero) // TODO: fix } - /// Create a new [Public] from a byte array + /// Create a new [PublicBox] from a byte array pub fn new(value: [u8; N]) -> Self { Self { inner: Box::new(Public::new(value)), } } - /// Create a zero initialized [Public] + /// Create a zero initialized [PublicBox] pub fn zero() -> Self { Self { inner: Box::new(Public::zero()), } } - /// Create a random initialized [Public] + /// Create a random initialized [PublicBox] pub fn random() -> Self { mutating(Self::zero(), |r| r.randomize()) } - /// Randomize all bytes in an existing [Public] + /// Randomize all bytes in an existing [PublicBox] pub fn randomize(&mut self) { (**self).try_fill(&mut crate::rand::rng()).unwrap() }