pub struct KeygenPrivateKey(pub(crate) [u8; 32]);Expand description
A 32-byte private key used for initializing the key generation protocol.
The KeygenPrivateKey represents the private key material that corresponds to a
KeygenId. This key is used to authenticate and secure the participant’s
involvement in the multi-party computation protocols.
§Security Notes
- This key should be kept secure and never shared with other parties
- The key is exactly 32 bytes in length
- It’s generated automatically during the initialization phase
§Examples
use sodot_mpc::KeygenPrivateKey;
// Create a KeygenPrivateKey from a 32-byte array
let key_bytes = [1u8; 32]; // Example 32-byte array
let private_key = KeygenPrivateKey::new(key_bytes);
println!("Created private key: {:?}", private_key);Tuple Fields§
§0: [u8; 32]Implementations§
Source§impl KeygenPrivateKey
impl KeygenPrivateKey
Sourcepub fn into_bytes(self) -> [u8; 32]
pub fn into_bytes(self) -> [u8; 32]
Consumes the KeygenPrivateKey and returns the underlying 32-byte array.
Trait Implementations§
Source§impl Clone for KeygenPrivateKey
impl Clone for KeygenPrivateKey
Source§fn clone(&self) -> KeygenPrivateKey
fn clone(&self) -> KeygenPrivateKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KeygenPrivateKey
impl Debug for KeygenPrivateKey
Source§impl FromFFI for KeygenPrivateKey
impl FromFFI for KeygenPrivateKey
Auto Trait Implementations§
impl Freeze for KeygenPrivateKey
impl RefUnwindSafe for KeygenPrivateKey
impl Send for KeygenPrivateKey
impl Sync for KeygenPrivateKey
impl Unpin for KeygenPrivateKey
impl UnwindSafe for KeygenPrivateKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more