Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Hinton committed Apr 25, 2024
1 parent da787a2 commit 7baa6f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/bitwarden/src/auth/tde.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use base64::{engine::general_purpose::STANDARD, Engine};
use base64::engine::general_purpose::STANDARD;
use bitwarden_crypto::{
AsymmetricEncString, AsymmetricPublicCryptoKey, DeviceKey, EncString, Kdf, SensitiveVec,
AsymmetricEncString, AsymmetricPublicCryptoKey, DeviceKey, EncString, Kdf, SensitiveString,
SymmetricCryptoKey, TrustDeviceResponse, UserKey,
};

Expand All @@ -15,9 +15,9 @@ pub(super) fn make_register_tde_keys(
org_public_key: String,
remember_device: bool,
) -> Result<RegisterTdeKeyResponse> {
let public_key = AsymmetricPublicCryptoKey::from_der(SensitiveVec::new(Box::new(
STANDARD.decode(org_public_key)?,
)))?;
let public_key = AsymmetricPublicCryptoKey::from_der(
SensitiveString::new(Box::new(org_public_key)).decode_base64(STANDARD)?,
)?;

Check warning on line 20 in crates/bitwarden/src/auth/tde.rs

View check run for this annotation

Codecov / codecov/patch

crates/bitwarden/src/auth/tde.rs#L18-L20

Added lines #L18 - L20 were not covered by tests

let mut rng = rand::thread_rng();

Expand Down

0 comments on commit 7baa6f1

Please sign in to comment.