typings: add typing for crypto by panva · Pull Request #64122 · nodejs/node · GitHub
Skip to content

typings: add typing for crypto#64122

Open
panva wants to merge 1 commit into
nodejs:mainfrom
panva:internal-bindings-crypto
Open

typings: add typing for crypto#64122
panva wants to merge 1 commit into
nodejs:mainfrom
panva:internal-bindings-crypto

Conversation

@panva

@panva panva commented Jun 25, 2026

Copy link
Copy Markdown
Member

Add typings for the internalBinding('crypto') surface used by the JS crypto, TLS, and WebCrypto implementation, and wire the binding into InternalBindingMap.

The declaration models the JS-consumed native surface, including mode-dependent CryptoJob behavior, WebCrypto promise jobs, CryptoKey/KeyObject slot tuples, key generation result shapes, sign/verify/MAC result types, cipher jobs, FIPS/root-certificate helpers, secureHeapUsed(), and timingSafeEqual().

This also adds JSDoc types for the internal WebCrypto job-promise helpers so Promise payloads such as generated CryptoKey values are preserved through jobPromise() and jobPromiseThen().

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
@panva panva requested a review from anonrig June 25, 2026 08:43
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot nodejs-github-bot added crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. typings labels Jun 25, 2026
@panva panva removed the needs-ci PRs that need a full CI run. label Jun 25, 2026

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSLGTM

@panva panva added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 25, 2026
@panva panva added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. crypto Issues and PRs related to the crypto subsystem. typings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants