fn secret_import(
        &mut self,
        secret: &[u8],
        attributes: SecretAttributes,
    ) -> OckamResult<Box<dyn Secret>> {
        // write the secret to disk using the context id
        let ctx = self.v.secret_import(secret, attributes)?;
        let id = self.add_secret(ctx);
        fs_write_secret(self.path.clone(), id, &secret, attributes)?;

        Ok(Box::new(FilesystemVaultSecret(id)))
    }
/// Import a secret key into the vault
Import a secret key into the vault
Import a secret key into the vault
fn secret_import(
        &mut self,
        secret: &[u8],
        attributes: SecretAttributes,
    ) -> OckamResult<Box<dyn Secret>> {
        // write the secret to disk using the context id
        let ctx = self.v.secret_import(secret, attributes)?;
        let id = self.add_secret(ctx);
        fs_write_secret(self.path.clone(), id, &secret, attributes)?;
        Ok(Box::new(FilesystemVaultSecret(id)))
    }
fn secret_import ( & mut self , secret : & [ u8 ] , attributes : SecretAttributes , ) -> OckamResult < Box < dyn Secret > > { // write the secret to disk using the context id let ctx = self . v . secret_import ( secret , attributes ) ? ; let id = self . add_secret ( ctx ) ; fs_write_secret ( self . path . clone ( ) , id , & secret , attributes ) ? ; Ok ( Box :: new ( FilesystemVaultSecret ( id ) ) ) }
Import a secret key into the vault
Import a secret key into the vault
&mut self
secret
&[u8]
attributes
SecretAttributes
&mut self
secret
&[u8]
attributes
SecretAttributes