Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix crypto.generateKey aes allowed length list #36928

Merged
merged 1 commit into from
Jan 18, 2021

Conversation

panva
Copy link
Member

@panva panva commented Jan 14, 2021

No description provided.

@panva panva added doc Issues and PRs related to the documentations. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Jan 14, 2021
@nodejs-github-bot nodejs-github-bot added the crypto Issues and PRs related to the crypto subsystem. label Jan 14, 2021
@panva
Copy link
Member Author

panva commented Jan 14, 2021

> crypto.generateKeySync('aes', { length: 128 })
SecretKeyObject { [Symbol(kKeyType)]: 'secret' }
> crypto.generateKeySync('aes', { length: 192 })
SecretKeyObject { [Symbol(kKeyType)]: 'secret' }
> crypto.generateKeySync('aes', { length: 256 })
SecretKeyObject { [Symbol(kKeyType)]: 'secret' }
> crypto.generateKeySync('aes', { length: 512 })
Uncaught:
TypeError [ERR_INVALID_ARG_VALUE]: The property 'options.length' must be one of: 128, 192, 256. Received 512
    at generateKeyJob (node:internal/crypto/keygen:328:7)
    at Object.generateKeySync (node:internal/crypto/keygen:371:5)
    at REPL6:1:8
    at Script.runInThisContext (node:vm:134:12)
    at REPLServer.defaultEval (node:repl:508:29)
    at bound (node:domain:416:15)
    at REPLServer.runBound [as eval] (node:domain:427:12)
    at REPLServer.onLine (node:repl:834:10)
    at REPLServer.emit (node:events:391:22)
    at REPLServer.EventEmitter.emit (node:domain:470:12) {
  code: 'ERR_INVALID_ARG_VALUE'
}

@panva panva changed the title doc: fix crypto.generateKeySync aes allowed length list doc: fix crypto.generateKey aes allowed length list Jan 14, 2021
@aduh95 aduh95 removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 14, 2021
@aduh95
Copy link
Contributor

aduh95 commented Jan 14, 2021

Removing the author ready as this PR lacks approval.

@panva panva added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 14, 2021
@panva
Copy link
Member Author

panva commented Jan 14, 2021

@aduh95 thank you, re-added now that there is one.

PR-URL: nodejs#36928
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@aduh95 aduh95 merged commit 51e77b3 into nodejs:master Jan 18, 2021
@aduh95
Copy link
Contributor

aduh95 commented Jan 18, 2021

Landed in 51e77b3

ruyadorno pushed a commit that referenced this pull request Jan 22, 2021
PR-URL: #36928
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@ruyadorno ruyadorno mentioned this pull request Jan 22, 2021
@panva panva deleted the doc-generate-key branch October 13, 2022 09:13
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. 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.

None yet

6 participants