diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-09-21 16:08:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-21 08:08:23 -0600 |
commit | 142449ecab20006c5cfd15462814650596bc034d (patch) | |
tree | b4e796585f870fbf0b1ebe696a474abb1a09d2ac /ext/crypto/lib.rs | |
parent | cf6f649829fbb0562681bc9db0c4c1261d4a40b1 (diff) |
refactor: rewrite some ops to op2 macro (#20603)
Diffstat (limited to 'ext/crypto/lib.rs')
-rw-r--r-- | ext/crypto/lib.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/crypto/lib.rs b/ext/crypto/lib.rs index 8b329a7ca..e47cc8f3c 100644 --- a/ext/crypto/lib.rs +++ b/ext/crypto/lib.rs @@ -8,7 +8,6 @@ use deno_core::error::custom_error; use deno_core::error::not_supported; use deno_core::error::type_error; use deno_core::error::AnyError; -use deno_core::op; use deno_core::op2; use deno_core::ToJsBuffer; @@ -46,7 +45,6 @@ use sha2::Sha512; use signature::RandomizedSigner; use signature::Signer; use signature::Verifier; -use std::convert::TryFrom; use std::num::NonZeroU32; use std::path::PathBuf; @@ -422,10 +420,11 @@ pub struct DeriveKeyArg { info: Option<JsBuffer>, } -#[op] +#[op2(async)] +#[serde] pub async fn op_crypto_derive_bits( - args: DeriveKeyArg, - zero_copy: Option<JsBuffer>, + #[serde] args: DeriveKeyArg, + #[buffer] zero_copy: Option<JsBuffer>, ) -> Result<ToJsBuffer, AnyError> { let algorithm = args.algorithm; match algorithm { |