Title: crypto.verify accepted types mismatch documentation (and crypto.sign) · Issue #62903 · nodejs/node · GitHub
Open Graph Title: crypto.verify accepted types mismatch documentation (and crypto.sign) · Issue #62903 · nodejs/node
X Title: crypto.verify accepted types mismatch documentation (and crypto.sign) · Issue #62903 · nodejs/node
Description: https://github.com/nodejs/node/blob/HEAD/lib/internal/crypto/sig.js#L268 > const { privateKey, publicKey } = require('crypto').generateKeyPairSync('rsa', { modulusLength: 2048 }) > require('crypto').sign('SHA256', new ArrayBuffer(32), pr...
Open Graph Description: https://github.com/nodejs/node/blob/HEAD/lib/internal/crypto/sig.js#L268 > const { privateKey, publicKey } = require('crypto').generateKeyPairSync('rsa', { modulusLength: 2048 }) > require('crypto'...
X Description: https://github.com/nodejs/node/blob/HEAD/lib/internal/crypto/sig.js#L268 > const { privateKey, publicKey } = require('crypto').generateKeyPairSync('rsa', { modulusLength: 2048 })...
Opengraph URL: https://github.com/nodejs/node/issues/62903
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"crypto.verify accepted types mismatch documentation (and crypto.sign)","articleBody":"\u003cimg width=\"1063\" height=\"127\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/8701eaa8-e793-46ae-bdf8-6acbf81a149d\" /\u003e\n\nhttps://github.com/nodejs/node/blob/HEAD/lib/internal/crypto/sig.js#L268\n\n```js\n\u003e const { privateKey, publicKey } = require('crypto').generateKeyPairSync('rsa', { modulusLength: 2048 })\n\u003e require('crypto').sign('SHA256', new ArrayBuffer(32), privateKey)\n\u003e require('crypto').verify('SHA256', new ArrayBuffer(32), publicKey, _)\nUncaught:\nTypeError [ERR_INVALID_ARG_TYPE]: The \"data\" argument must be an instance of Buffer, TypedArray, or DataView. Received an instance of ArrayBuffer\n at Object.verifyOneShot [as verify] (node:internal/crypto/sig:261:11) {\n code: 'ERR_INVALID_ARG_TYPE'\n}\n```\n\nDocumentation: https://nodejs.org/api/crypto.html#cryptoverifyalgorithm-data-key-signature-callback\n\u003cimg width=\"903\" height=\"346\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/67a3a582-c73d-4c16-9ff4-835ede4a0624\" /\u003e\n","author":{"url":"https://github.com/ChALkeR","@type":"Person","name":"ChALkeR"},"datePublished":"2026-04-23T05:04:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/62903/node/issues/62903"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3d5c9eff-7e41-a8db-9862-eacdf9bd7b0c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BAA6:31CFDC:2BD1F0:3C1759:6A4D3573 |
| html-safe-nonce | 145b7319a45c6145b65385253e899fc3f9226dad44466bf4a7c59da846d089c5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQUE2OjMxQ0ZEQzoyQkQxRjA6M0MxNzU5OjZBNEQzNTczIiwidmlzaXRvcl9pZCI6IjY5MjM5NTI2MjExNjcxMjk5NzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f25f4178a13ce70fb9acd434cf0e4db847ad468aed7a46359fa97d1465fe81d4 |
| hovercard-subject-tag | issue:4313624582 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/62903/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5c4e00b31a2933c91d912cf7e90d62f417a64248f12e7639e53d4fd34792cdb6/nodejs/node/issues/62903 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5c4e00b31a2933c91d912cf7e90d62f417a64248f12e7639e53d4fd34792cdb6/nodejs/node/issues/62903 |
| og:image:alt | https://github.com/nodejs/node/blob/HEAD/lib/internal/crypto/sig.js#L268 > const { privateKey, publicKey } = require('crypto').generateKeyPairSync('rsa', { modulusLength: 2048 }) > require('crypto'... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ChALkeR |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fc8347865a14e2ec811533d68f929cf4e0ec19 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width