Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the from impls for going from an operations and result to NativeOperation and NativeResult for asym encrypt and decrypt #64

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/operations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,18 @@ impl From<psa_verify_hash::Operation> for NativeOperation {
}
}

impl From<psa_asymmetric_encrypt::Operation> for NativeOperation {
fn from(op: psa_asymmetric_encrypt::Operation) -> Self {
NativeOperation::PsaAsymmetricEncrypt(op)
}
}

impl From<psa_asymmetric_decrypt::Operation> for NativeOperation {
fn from(op: psa_asymmetric_decrypt::Operation) -> Self {
NativeOperation::PsaAsymmetricDecrypt(op)
}
}

impl From<list_providers::Result> for NativeResult {
fn from(op: list_providers::Result) -> Self {
NativeResult::ListProviders(op)
Expand Down Expand Up @@ -258,3 +270,15 @@ impl From<psa_verify_hash::Result> for NativeResult {
NativeResult::PsaVerifyHash(op)
}
}

impl From<psa_asymmetric_encrypt::Result> for NativeResult {
fn from(op: psa_asymmetric_encrypt::Result) -> Self {
NativeResult::PsaAsymmetricEncrypt(op)
}
}

impl From<psa_asymmetric_decrypt::Result> for NativeResult {
fn from(op: psa_asymmetric_decrypt::Result) -> Self {
NativeResult::PsaAsymmetricDecrypt(op)
}
}