From 8e3e4f15799774fb97827008bb37b89509aa769c Mon Sep 17 00:00:00 2001 From: Pedro Barbosa <1180592@isep.ipp.pt> Date: Tue, 9 Jan 2024 21:55:23 +0000 Subject: [PATCH] Modified SecretBox to allow external call to the "new" method --- umbral-pre/src/secret_box.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/umbral-pre/src/secret_box.rs b/umbral-pre/src/secret_box.rs index bc9fe58..38604a4 100644 --- a/umbral-pre/src/secret_box.rs +++ b/umbral-pre/src/secret_box.rs @@ -45,7 +45,8 @@ impl SecretBox where T: Zeroize + Clone, { - pub(crate) fn new(val: T) -> Self { + /// Creates an new instance of an immutable reference to the secret data. + pub fn new(val: T) -> Self { Self(Box::new(val)) }