summaryrefslogtreecommitdiff
path: root/ext/node/ops/crypto/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/ops/crypto/mod.rs')
-rw-r--r--ext/node/ops/crypto/mod.rs21
1 files changed, 18 insertions, 3 deletions
diff --git a/ext/node/ops/crypto/mod.rs b/ext/node/ops/crypto/mod.rs
index 05501fa87..738437577 100644
--- a/ext/node/ops/crypto/mod.rs
+++ b/ext/node/ops/crypto/mod.rs
@@ -362,18 +362,33 @@ pub fn op_node_sign(
#[cppgc] handle: &KeyObjectHandle,
#[buffer] digest: &[u8],
#[string] digest_type: &str,
+ #[smi] pss_salt_length: Option<u32>,
+ #[smi] dsa_signature_encoding: u32,
) -> Result<Box<[u8]>, AnyError> {
- handle.sign_prehashed(digest_type, digest)
+ handle.sign_prehashed(
+ digest_type,
+ digest,
+ pss_salt_length,
+ dsa_signature_encoding,
+ )
}
-#[op2(fast)]
+#[op2]
pub fn op_node_verify(
#[cppgc] handle: &KeyObjectHandle,
#[buffer] digest: &[u8],
#[string] digest_type: &str,
#[buffer] signature: &[u8],
+ #[smi] pss_salt_length: Option<u32>,
+ #[smi] dsa_signature_encoding: u32,
) -> Result<bool, AnyError> {
- handle.verify_prehashed(digest_type, digest, signature)
+ handle.verify_prehashed(
+ digest_type,
+ digest,
+ signature,
+ pss_salt_length,
+ dsa_signature_encoding,
+ )
}
fn pbkdf2_sync(