diff --git a/rust/pv/src/crypto.rs b/rust/pv/src/crypto.rs index bf37b650..edd2692d 100644 --- a/rust/pv/src/crypto.rs +++ b/rust/pv/src/crypto.rs @@ -150,7 +150,7 @@ pub fn derive_aes256_gcm_key(k1: &PKeyRef, k2: &PKeyRef) -> Res /// # Errors /// /// This function will return an error if the entropy source fails or is not available. -pub(crate) fn random_array() -> Result<[u8; COUNT]> { +pub fn random_array() -> Result<[u8; COUNT]> { let mut rand = [0; COUNT]; rand_bytes(&mut rand)?; Ok(rand) diff --git a/rust/pv/src/lib.rs b/rust/pv/src/lib.rs index db5593a9..02d797f9 100644 --- a/rust/pv/src/lib.rs +++ b/rust/pv/src/lib.rs @@ -92,7 +92,7 @@ pub use pv_core::{FileAccessErrorType, FileIoErrorType}; /// Functionalities to build UV requests pub mod request { pub use crate::brcb::BootHdrTags; - pub use crate::crypto::{derive_aes256_gcm_key, SymKey, SymKeyType}; + pub use crate::crypto::{derive_aes256_gcm_key, random_array, SymKey, SymKeyType}; pub use crate::req::{EcPubKeyCoord, Keyslot, ReqEncrCtx, Request}; pub use crate::verify::{CertVerifier, HkdVerifier, NoVerifyHkd};