/// generate a random key using secure random bytes
generate a random key using secure random bytes
generate a random key using secure random bytes
pub fn random() -> crate::Result<Self> {
        Ok(Self {
            key: GuardedVec::new(T::box_key_len(), |v| {
                v.copy_from_slice(
                    T::random_vec(T::box_key_len())
                        .expect("failed to generate random key")
                        .as_slice(),
                )
            }),
            _box_provider: PhantomData,
        })
    }
pub fn random ( ) -> crate :: Result < Self > { Ok ( Self { key : GuardedVec :: new ( T :: box_key_len ( ) , | v | { v . copy_from_slice ( T :: random_vec ( T :: box_key_len ( ) ) . expect ( " " ) . as_slice ( ) , ) } ) , _box_provider : PhantomData , } ) }
generate a random key using secure random bytes
generate a random key using secure random bytes