mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
typings: share Sign and Verify handle methods
Extract SignBaseHandle for the shared init and update methods. Preserve existing signatures and runtime behavior. Assisted-by: Codex Signed-off-by: leah-1ee <selee3196@gmail.com> PR-URL: https://github.com/nodejs/node/pull/66499 Reviewed-By: Tim Perry <pimterry@gmail.com>
This commit is contained in:
1 parent
510d84c330
commit
2eded683c5
1 file changed
+5
-4
Vendored
+5
-4
@@ -665,9 +665,12 @@ declare namespace InternalCryptoBinding {
|
||||
setPrivateKey(key: ByteSource): void;
|
||||
}
|
||||
|
||||
interface SignHandle {
|
||||
interface SignBaseHandle {
|
||||
init(algorithm: string): void;
|
||||
update(data: ByteSource, encoding?: string): void;
|
||||
}
|
||||
|
||||
interface SignHandle extends SignBaseHandle {
|
||||
sign(
|
||||
...args: [
|
||||
...key: PreparedAsymmetricKeyArgs,
|
||||
@@ -678,9 +681,7 @@ declare namespace InternalCryptoBinding {
|
||||
): Buffer;
|
||||
}
|
||||
|
||||
interface VerifyHandle {
|
||||
init(algorithm: string): void;
|
||||
update(data: ByteSource, encoding?: string): void;
|
||||
interface VerifyHandle extends SignBaseHandle {
|
||||
verify(
|
||||
...args: [
|
||||
...key: PreparedAsymmetricKeyArgs,
|
||||
|
||||
Reference in new issue
Block a user