doc: fix crypto.generateKey aes allowed length list#36928
Merged
aduh95 merged 1 commit intonodejs:masterfrom Jan 18, 2021
Merged
doc: fix crypto.generateKey aes allowed length list#36928aduh95 merged 1 commit intonodejs:masterfrom
aduh95 merged 1 commit intonodejs:masterfrom
Conversation
Member
Author
> 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'
} |
Contributor
|
Removing the |
jasnell
approved these changes
Jan 14, 2021
Member
Author
|
@aduh95 thank you, re-added now that there is one. |
tniessen
approved these changes
Jan 18, 2021
PR-URL: nodejs#36928 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
4271d7c to
51e77b3
Compare
Contributor
|
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>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.