pub fn open_payload<P: BoxProvider>(&self, key: &Key<P>, data: &[u8]) -> crate::Result<Vec<u8>> {
        let id = self.force_typed::<DataTransaction>().id;
        let payload = SealedPayload::from(data.to_vec()).decrypt(key, id.as_ref())?;
        Ok(payload)
    }
/// open the payload given a key and the cipher.
open the payload given a key and the cipher.
open the payload given a key and the cipher .
pub fn open_payload<P: BoxProvider>(&self, key: &Key<P>, data: &[u8]) -> crate::Result<Vec<u8>> {
        let id = self.force_typed::<DataTransaction>().id;
        let payload = SealedPayload::from(data.to_vec()).decrypt(key, id.as_ref())?;
        Ok(payload)
    }
pub fn open_payload < P : BoxProvider > ( & self , key : & Key < P > , data : & [ u8 ] ) -> crate :: Result < Vec < u8 > > { let id = self . force_typed :: < DataTransaction > ( ) . id ; let payload = SealedPayload :: from ( data . to_vec ( ) ) . decrypt ( key , id . as_ref ( ) ) ? ; Ok ( payload ) }
open the payload given a key and the cipher.
open the payload given a key and the cipher .
&self
key
&Key<P>
data
&[u8]