Skip to content

Commit fc243a4

Browse files
committed
Add SessionStaticSecret::to_bytes but only with test vector feature flag
1 parent edab7b9 commit fc243a4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

nucypher-core/src/dkg.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,15 @@ pub mod session {
294294
let public_key = PublicKey::from(&self.0);
295295
SessionStaticKey(public_key)
296296
}
297+
298+
#[cfg(feature = "test_vectors")]
299+
/// Returns the raw bytes of the secret key.
300+
///
301+
/// This function is only available when the `test_vectors` feature is enabled.
302+
/// It should only be used for test vector generation and not in production code.
303+
pub fn to_bytes(&self) -> [u8; 32] {
304+
self.0.to_bytes()
305+
}
297306
}
298307

299308
impl fmt::Display for SessionStaticSecret {

0 commit comments

Comments
 (0)