Skip to content

Commit

Permalink
Change to pass in encrypted data
Browse files Browse the repository at this point in the history
  • Loading branch information
Hinton committed Sep 4, 2023
1 parent 7e654b3 commit 2a62534
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions crates/bitwarden-uniffi/src/tool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::sync::Arc;

use bitwarden::{
tool::{ExportFormat, PassphraseGeneratorRequest, PasswordGeneratorRequest},
vault::{CipherView, CollectionView, FolderView},
vault::{Cipher, Collection, Folder},
};

use crate::{error::Result, Client};
Expand Down Expand Up @@ -45,8 +45,8 @@ impl ClientExporters {
/// **API Draft:** Export user vault
pub async fn export_vault(
&self,
folders: Vec<FolderView>,
ciphers: Vec<CipherView>,
folders: Vec<Folder>,
ciphers: Vec<Cipher>,
format: ExportFormat,
) -> Result<String> {
Ok(self
Expand All @@ -62,8 +62,8 @@ impl ClientExporters {
/// **API Draft:** Export organization vault
pub async fn export_organization_vault(
&self,
collections: Vec<CollectionView>,
ciphers: Vec<CipherView>,
collections: Vec<Collection>,
ciphers: Vec<Cipher>,
format: ExportFormat,
) -> Result<String> {
Ok(self
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden/src/crypto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! This module contains the cryptographic primitives used throughout the SDK. The module makes a
//! best effort to abstract away cryptographic concepts into concepts such as
//! [`EncString`][EncString] and [`SymmetricCryptoKey`][SymmetricCryptoKey].
//! [`EncString`] and [`SymmetricCryptoKey`].
//!
//! ## Conventions:
//!
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub mod mobile;
pub mod platform;
#[cfg(feature = "secrets")]
pub mod secrets_manager;
#[cfg(feature = "internal")]
#[cfg(feature = "mobile")]
pub mod tool;
#[cfg(feature = "mobile")]
pub(crate) mod uniffi_support;
Expand Down
10 changes: 5 additions & 5 deletions crates/bitwarden/src/tool/exporters/client_exporter.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
error::Result,
tool::exporters::{export_organization_vault, export_vault, ExportFormat},
vault::{CipherView, CollectionView, FolderView},
vault::{Cipher, Collection, Folder},
Client,
};

Expand All @@ -12,17 +12,17 @@ pub struct ClientExporters<'a> {
impl<'a> ClientExporters<'a> {
pub async fn export_vault(
&self,
folders: Vec<FolderView>,
ciphers: Vec<CipherView>,
folders: Vec<Folder>,
ciphers: Vec<Cipher>,
format: ExportFormat,
) -> Result<String> {
export_vault(folders, ciphers, format)
}

pub async fn export_organization_vault(
&self,
collections: Vec<CollectionView>,
ciphers: Vec<CipherView>,
collections: Vec<Collection>,
ciphers: Vec<Cipher>,
format: ExportFormat,
) -> Result<String> {
export_organization_vault(collections, ciphers, format)
Expand Down
10 changes: 5 additions & 5 deletions crates/bitwarden/src/tool/exporters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use schemars::JsonSchema;

use crate::{
error::Result,
vault::{CipherView, CollectionView, FolderView},
vault::{Cipher, Collection, Folder},
};

mod client_exporter;
Expand All @@ -17,16 +17,16 @@ pub enum ExportFormat {
}

pub(super) fn export_vault(
_folders: Vec<FolderView>,
_ciphers: Vec<CipherView>,
_folders: Vec<Folder>,
_ciphers: Vec<Cipher>,
_format: ExportFormat,
) -> Result<String> {
todo!();
}

pub(super) fn export_organization_vault(
_collections: Vec<CollectionView>,
_ciphers: Vec<CipherView>,
_collections: Vec<Collection>,
_ciphers: Vec<Cipher>,
_format: ExportFormat,
) -> Result<String> {
todo!();
Expand Down
8 changes: 4 additions & 4 deletions languages/kotlin/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ Initialization method for the crypto. Needs to be called before any other crypto
**Arguments**:

- self:
- folders: Vec<FolderView>
- ciphers: Vec<CipherView>
- folders: Vec<Folder>
- ciphers: Vec<Cipher>
- format: [ExportFormat](#exportformat)

**Output**: std::result::Result<String,BitwardenError>
Expand All @@ -202,8 +202,8 @@ Initialization method for the crypto. Needs to be called before any other crypto
**Arguments**:

- self:
- collections: Vec<CollectionView>
- ciphers: Vec<CipherView>
- collections: Vec<Collection>
- ciphers: Vec<Cipher>
- format: [ExportFormat](#exportformat)

**Output**: std::result::Result<String,BitwardenError>
Expand Down

0 comments on commit 2a62534

Please sign in to comment.