pub fn load(key: Vec<u8>) -> crate::Result<Self> {
        match key {
            key if key.len() != T::box_key_len() => Err(crate::Error::InterfaceError),
            key => Ok(Self {
                key: GuardedVec::new(T::box_key_len(), |v| v.copy_from_slice(key.as_slice())),
                _box_provider: PhantomData,
            }),
        }
    }
/// attempts to load a key from inputted data
attempts to load a key from inputted data
attempts to load a key from inputted data
pub fn load(key: Vec<u8>) -> crate::Result<Self> {
        match key {
            key if key.len() != T::box_key_len() => Err(crate::Error::InterfaceError),
            key => Ok(Self {
                key: GuardedVec::new(T::box_key_len(), |v| v.copy_from_slice(key.as_slice())),
                _box_provider: PhantomData,
            }),
        }
    }
pub fn load ( key : Vec < u8 > ) -> crate :: Result < Self > { match key { key if key . len ( ) != T :: box_key_len ( ) => Err ( crate :: Error :: InterfaceError ) , key => Ok ( Self { key : GuardedVec :: new ( T :: box_key_len ( ) , | v | v . copy_from_slice ( key . as_slice ( ) ) ) , _box_provider : PhantomData , } ) , } }
attempts to load a key from inputted data
attempts to load a key from inputted data
key
Vec<u8>
key
Vec<u8>