Skip to content

doc: fix crypto.sign and crypto.verify accepted types#63268

Open
Anshikakalpana wants to merge 1 commit into
nodejs:mainfrom
Anshikakalpana:crypto-sign-verify-doc-types
Open

doc: fix crypto.sign and crypto.verify accepted types#63268
Anshikakalpana wants to merge 1 commit into
nodejs:mainfrom
Anshikakalpana:crypto-sign-verify-doc-types

Conversation

@Anshikakalpana
Copy link
Copy Markdown
Contributor

Updates the documented accepted parameter types for crypto.sign() and crypto.verify() to match the current runtime behavior.

Runtime testing confirmed that:

  • crypto.sign() accepts ArrayBuffer, SharedArrayBuffer, and string for data
  • crypto.verify() accepts string for data
  • crypto.verify() rejects ArrayBuffer and SharedArrayBuffer for both data and signature

The existing v15.0.0 changelog entry for crypto.verify() mentions ArrayBuffer support for data and signature, but current runtime behavior does not reflect that. A follow-up PR can address the runtime inconsistency in verifyOneShot().

Fixes: #62903

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations. labels May 12, 2026
@Anshikakalpana Anshikakalpana force-pushed the crypto-sign-verify-doc-types branch from 55ff922 to 6ebf424 Compare May 12, 2026 18:55
@panva
Copy link
Copy Markdown
Member

panva commented May 12, 2026

I would rather we do a single sweep PR that both ensures alignment, ensures coverage, and updates docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

crypto.verify accepted types mismatch documentation (and crypto.sign)

3 participants