@@ -5,12 +5,12 @@ use bitwarden_crypto::{EncString, UnsignedSharedKey};
5
5
use wasm_bindgen:: prelude:: * ;
6
6
7
7
use super :: crypto:: {
8
- derive_key_connector, make_key_pair, verify_asymmetric_keys, DeriveKeyConnectorError ,
9
- DeriveKeyConnectorRequest , EnrollAdminPasswordResetError , MakeKeyPairResponse ,
10
- MobileCryptoError , VerifyAsymmetricKeysRequest , VerifyAsymmetricKeysResponse ,
8
+ derive_key_connector, make_key_pair, verify_asymmetric_keys, CryptoClientError ,
9
+ DeriveKeyConnectorError , DeriveKeyConnectorRequest , EnrollAdminPasswordResetError ,
10
+ MakeKeyPairResponse , VerifyAsymmetricKeysRequest , VerifyAsymmetricKeysResponse ,
11
11
} ;
12
12
#[ cfg( feature = "internal" ) ]
13
- use crate :: mobile :: crypto:: {
13
+ use crate :: key_management :: crypto:: {
14
14
derive_pin_key, derive_pin_user_key, enroll_admin_password_reset, get_user_encryption_key,
15
15
initialize_org_crypto, initialize_user_crypto, update_password, DerivePinKeyResponse ,
16
16
InitOrgCryptoRequest , InitUserCryptoRequest , UpdatePasswordResponse ,
@@ -63,7 +63,7 @@ impl CryptoClient {
63
63
impl CryptoClient {
64
64
/// Get the uses's decrypted encryption key. Note: It's very important
65
65
/// to keep this key safe, as it can be used to decrypt all of the user's data
66
- pub async fn get_user_encryption_key ( & self ) -> Result < String , MobileCryptoError > {
66
+ pub async fn get_user_encryption_key ( & self ) -> Result < String , CryptoClientError > {
67
67
get_user_encryption_key ( & self . client ) . await
68
68
}
69
69
@@ -72,14 +72,14 @@ impl CryptoClient {
72
72
pub fn update_password (
73
73
& self ,
74
74
new_password : String ,
75
- ) -> Result < UpdatePasswordResponse , MobileCryptoError > {
75
+ ) -> Result < UpdatePasswordResponse , CryptoClientError > {
76
76
update_password ( & self . client , new_password)
77
77
}
78
78
79
79
/// Generates a PIN protected user key from the provided PIN. The result can be stored and later
80
80
/// used to initialize another client instance by using the PIN and the PIN key with
81
81
/// `initialize_user_crypto`.
82
- pub fn derive_pin_key ( & self , pin : String ) -> Result < DerivePinKeyResponse , MobileCryptoError > {
82
+ pub fn derive_pin_key ( & self , pin : String ) -> Result < DerivePinKeyResponse , CryptoClientError > {
83
83
derive_pin_key ( & self . client , pin)
84
84
}
85
85
@@ -88,7 +88,7 @@ impl CryptoClient {
88
88
pub fn derive_pin_user_key (
89
89
& self ,
90
90
encrypted_pin : EncString ,
91
- ) -> Result < EncString , MobileCryptoError > {
91
+ ) -> Result < EncString , CryptoClientError > {
92
92
derive_pin_user_key ( & self . client , encrypted_pin)
93
93
}
94
94
0 commit comments