-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a863e89
commit a8afee5
Showing
29 changed files
with
240 additions
and
164 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,7 +122,7 @@ fn test_auth_request() { | |
mod tests { | ||
use std::num::NonZeroU32; | ||
|
||
use bitwarden_crypto::Kdf; | ||
use bitwarden_crypto::{Kdf, SensitiveVec}; | ||
|
||
use super::*; | ||
use crate::mobile::crypto::{AuthRequestMethod, InitUserCryptoMethod, InitUserCryptoRequest}; | ||
|
@@ -132,7 +132,7 @@ mod tests { | |
let mut client = Client::new(None); | ||
|
||
let master_key = bitwarden_crypto::MasterKey::derive( | ||
"asdfasdfasdf".as_bytes(), | ||
&SensitiveVec::test(b"asdfasdfasdf"), | ||
"[email protected]".as_bytes(), | ||
&Kdf::PBKDF2 { | ||
iterations: NonZeroU32::new(600_000).unwrap(), | ||
|
@@ -206,9 +206,12 @@ mod tests { | |
// Initialize an existing client which is unlocked | ||
let mut existing_device = Client::new(None); | ||
|
||
let master_key = | ||
bitwarden_crypto::MasterKey::derive("asdfasdfasdf".as_bytes(), email.as_bytes(), &kdf) | ||
.unwrap(); | ||
let master_key = bitwarden_crypto::MasterKey::derive( | ||
&SensitiveVec::test(b"asdfasdfasdf"), | ||
email.as_bytes(), | ||
&kdf, | ||
) | ||
.unwrap(); | ||
|
||
existing_device | ||
.initialize_user_crypto_master_key(master_key, user_key, private_key.parse().unwrap()) | ||
|
Oops, something went wrong.