diff options
Diffstat (limited to 'ext/crypto/decrypt.rs')
-rw-r--r-- | ext/crypto/decrypt.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/crypto/decrypt.rs b/ext/crypto/decrypt.rs index 6c4d5b6ba..fc54fe818 100644 --- a/ext/crypto/decrypt.rs +++ b/ext/crypto/decrypt.rs @@ -20,6 +20,7 @@ use deno_core::error::custom_error; use deno_core::error::type_error; use deno_core::error::AnyError; use deno_core::op; +use deno_core::task::spawn_blocking; use deno_core::ZeroCopyBuf; use rsa::pkcs1::DecodeRsaPrivateKey; use rsa::PaddingScheme; @@ -98,7 +99,7 @@ pub async fn op_crypto_decrypt( tag_length, } => decrypt_aes_gcm(key, length, tag_length, iv, additional_data, &data), }; - let buf = tokio::task::spawn_blocking(fun).await.unwrap()?; + let buf = spawn_blocking(fun).await.unwrap()?; Ok(buf.into()) } |