summaryrefslogtreecommitdiff
path: root/ext/crypto/encrypt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/crypto/encrypt.rs')
-rw-r--r--ext/crypto/encrypt.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/crypto/encrypt.rs b/ext/crypto/encrypt.rs
index f34e0cbc6..2831ca0f4 100644
--- a/ext/crypto/encrypt.rs
+++ b/ext/crypto/encrypt.rs
@@ -19,6 +19,7 @@ use ctr::Ctr64BE;
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 rand::rngs::OsRng;
use rsa::pkcs1::DecodeRsaPublicKey;
@@ -99,7 +100,7 @@ pub async fn op_crypto_encrypt(
key_length,
} => encrypt_aes_ctr(key, key_length, &counter, ctr_length, &data),
};
- let buf = tokio::task::spawn_blocking(fun).await.unwrap()?;
+ let buf = spawn_blocking(fun).await.unwrap()?;
Ok(buf.into())
}