-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Expose vec instead of map * Expose keys collection reason * Rename to derivation purpose * Rename to derivation purpose * PR suggestions * Change pre-commit
- Loading branch information
1 parent
f88548e
commit cfcd8b8
Showing
19 changed files
with
257 additions
and
40 deletions.
There are no files selected for viewing
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
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
29 changes: 29 additions & 0 deletions
29
crates/sargon-uniffi/src/keys_collector/derivation_purpose.rs
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use crate::prelude::*; | ||
use sargon::DerivationPurpose as InternalDerivationPurpose; | ||
|
||
/// The purpose that initiated an interaction with the host to derive keys. | ||
/// The orchestrator behind this operation is the `KeysCollector`. | ||
#[derive( | ||
Clone, Copy, Debug, PartialEq, Eq, InternalConversion, uniffi::Enum, | ||
)] | ||
pub enum DerivationPurpose { | ||
/// When the create account flow, initiates keys collection | ||
/// for account VECIs | ||
CreatingNewAccount, | ||
|
||
/// When the create persona flow, initiates keys collection | ||
/// for identity VECIs | ||
CreatingNewPersona, | ||
|
||
/// When applying a security shield to an account, initiates keys collection | ||
/// for account MFA | ||
SecurifyingAccount, | ||
|
||
/// When applying a security shield to a persona, initiates keys collection | ||
/// for identity MFA | ||
SecurifyingPersona, | ||
|
||
/// When adding a new factor source, initiates keys collection | ||
/// for collecting various factor instances. | ||
PreDerivingKeys, | ||
} |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
mod derivation_purpose; | ||
mod key_derivation_request; | ||
mod key_derivation_response; | ||
|
||
pub use derivation_purpose::*; | ||
pub use key_derivation_request::*; | ||
pub use key_derivation_response::*; |
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
Oops, something went wrong.