Skip to content

Commit 34f7433

Browse files
authored
doc: fix typos and inconsistencies in crypto.md and webcrypto.md
Signed-off-by: Filip Skokan <panva.ip@gmail.com> PR-URL: #62828 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent dd85293 commit 34f7433

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

doc/api/crypto.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ changes:
11721172
* `options` {Object} [`stream.transform` options][]
11731173
* `plaintextLength` {number}
11741174
* `encoding` {string} String encoding to use when `buffer` is a string.
1175-
* Returns: {Decipheriv} The same Decipher for method chaining.
1175+
* Returns: {Decipheriv} The same `Decipheriv` instance for method chaining.
11761176

11771177
When using an authenticated encryption mode (`GCM`, `CCM`, `OCB`, and
11781178
`chacha20-poly1305` are
@@ -1219,7 +1219,7 @@ changes:
12191219

12201220
* `buffer` {string|Buffer|ArrayBuffer|TypedArray|DataView}
12211221
* `encoding` {string} String encoding to use when `buffer` is a string.
1222-
* Returns: {Decipheriv} The same Decipher for method chaining.
1222+
* Returns: {Decipheriv} The same `Decipheriv` instance for method chaining.
12231223

12241224
When using an authenticated encryption mode (`GCM`, `CCM`, `OCB`, and
12251225
`chacha20-poly1305` are
@@ -1245,7 +1245,7 @@ added: v0.7.1
12451245
-->
12461246

12471247
* `autoPadding` {boolean} **Default:** `true`
1248-
* Returns: {Decipheriv} The same Decipher for method chaining.
1248+
* Returns: {Decipheriv} The same `Decipheriv` instance for method chaining.
12491249

12501250
When data has been encrypted without standard block padding, calling
12511251
`decipher.setAutoPadding(false)` will disable automatic padding to prevent
@@ -5335,7 +5335,7 @@ changes:
53355335

53365336
<!--lint enable maximum-line-length remark-lint-->
53375337

5338-
Decrypts `buffer` with `key`.`buffer` was previously encrypted using
5338+
Decrypts `buffer` with `key`. `buffer` was previously encrypted using
53395339
the corresponding private key, for example using [`crypto.privateEncrypt()`][].
53405340

53415341
If `key` is not a [`KeyObject`][], this function behaves as if

doc/api/webcrypto.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,8 @@ const decrypted = new TextDecoder().decode(await crypto.subtle.decrypt(
513513
514514
## Algorithm matrix
515515
516-
The tables details the algorithms supported by the Node.js Web Crypto API
517-
implementation and the APIs supported for each:
516+
The following tables detail the algorithms supported by the Node.js Web
517+
Crypto API implementation and the APIs supported for each:
518518
519519
### Key Management APIs
520520
@@ -755,7 +755,7 @@ Valid key usages depend on the key algorithm (identified by
755755
| `'ECDSA'` | | ✔ | | | |
756756
| `'Ed25519'` | | ✔ | | | |
757757
| `'Ed448'`[^secure-curves] | | ✔ | | | |
758-
| `'HDKF'` | | | ✔ | | |
758+
| `'HKDF'` | | | ✔ | | |
759759
| `'HMAC'` | | ✔ | | | |
760760
| `'KMAC128'`[^modern-algos] | | ✔ | | | |
761761
| `'KMAC256'`[^modern-algos] | | ✔ | | | |
@@ -992,7 +992,7 @@ a new {CryptoKey} based on the method and parameters in `derivedKeyAlgorithm`.
992992
993993
Calling this method is equivalent to calling [`subtle.deriveBits()`][] to
994994
generate raw keying material, then passing the result into the
995-
[`subtle.importKey()`][] method using the `deriveKeyAlgorithm`, `extractable`, and
995+
[`subtle.importKey()`][] method using the `derivedKeyAlgorithm`, `extractable`, and
996996
`keyUsages` parameters as input.
997997
998998
The algorithms currently supported include:
@@ -1348,7 +1348,7 @@ The algorithms currently supported include:
13481348
| `'ECDSA'` | ✔ | ✔ | ✔ | ✔ | | ✔ | |
13491349
| `'Ed25519'` | ✔ | ✔ | ✔ | ✔ | | ✔ | |
13501350
| `'Ed448'`[^secure-curves] | ✔ | ✔ | ✔ | ✔ | | ✔ | |
1351-
| `'HDKF'` | | | | ✔ | ✔ | | |
1351+
| `'HKDF'` | | | | ✔ | ✔ | | |
13521352
| `'HMAC'` | | | ✔ | ✔ | ✔ | | |
13531353
| `'KMAC128'`[^modern-algos] | | | ✔ | | ✔ | | |
13541354
| `'KMAC256'`[^modern-algos] | | | ✔ | | ✔ | | |
@@ -1472,14 +1472,14 @@ The unwrapped key algorithms supported include:
14721472
* `'Ed25519'`
14731473
* `'Ed448'`[^secure-curves]
14741474
* `'HMAC'`
1475-
* `'KMAC128'`[^secure-curves]
1476-
* `'KMAC256'`[^secure-curves]
1475+
* `'KMAC128'`[^modern-algos]
1476+
* `'KMAC256'`[^modern-algos]
14771477
* `'ML-DSA-44'`[^modern-algos]
14781478
* `'ML-DSA-65'`[^modern-algos]
14791479
* `'ML-DSA-87'`[^modern-algos]
14801480
* `'ML-KEM-512'`[^modern-algos]
14811481
* `'ML-KEM-768'`[^modern-algos]
1482-
* `'ML-KEM-1024'`[^modern-algos]v
1482+
* `'ML-KEM-1024'`[^modern-algos]
14831483
* `'RSA-OAEP'`
14841484
* `'RSA-PSS'`
14851485
* `'RSASSA-PKCS1-v1_5'`
@@ -1525,8 +1525,8 @@ The algorithms currently supported include:
15251525
* `'Ed25519'`
15261526
* `'Ed448'`[^secure-curves]
15271527
* `'HMAC'`
1528-
* `'KMAC128'`[^secure-curves]
1529-
* `'KMAC256'`[^secure-curves]
1528+
* `'KMAC128'`[^modern-algos]
1529+
* `'KMAC256'`[^modern-algos]
15301530
* `'ML-DSA-44'`[^modern-algos]
15311531
* `'ML-DSA-65'`[^modern-algos]
15321532
* `'ML-DSA-87'`[^modern-algos]
@@ -1873,7 +1873,7 @@ added: v24.7.0
18731873
added: v24.7.0
18741874
-->
18751875
1876-
* Type: {string} Must be `Ed448`[^secure-curves], `'ML-DSA-44'`[^modern-algos],
1876+
* Type: {string} Must be `'Ed448'`[^secure-curves], `'ML-DSA-44'`[^modern-algos],
18771877
`'ML-DSA-65'`[^modern-algos], or `'ML-DSA-87'`[^modern-algos].
18781878
18791879
#### `contextParams.context`
@@ -1909,7 +1909,7 @@ changes:
19091909
added: v24.7.0
19101910
-->
19111911
1912-
* Type: {string} Must be `'cSHAKE128'`[^modern-algos] or `'cSHAKE256'`[^modern-algos]
1912+
* Type: {string} Must be `'cSHAKE128'`[^modern-algos] or `'cSHAKE256'`[^modern-algos].
19131913
19141914
#### `cShakeParams.outputLength`
19151915
@@ -1929,7 +1929,7 @@ added: v24.7.0
19291929
19301930
* Type: {ArrayBuffer|TypedArray|DataView|Buffer|undefined}
19311931
1932-
The `functionName` member represents represents the function name, used by NIST to define
1932+
The `functionName` member represents the function name, used by NIST to define
19331933
functions based on cSHAKE.
19341934
The Node.js Web Crypto API implementation only supports zero-length functionName
19351935
which is equivalent to not providing functionName at all.
@@ -1968,9 +1968,9 @@ added: v15.0.0
19681968
19691969
* Type: {CryptoKey}
19701970
1971-
ECDH key derivation operates by taking as input one parties private key and
1972-
another parties public key -- using both to generate a common shared secret.
1973-
The `ecdhKeyDeriveParams.public` property is set to the other parties public
1971+
ECDH key derivation operates by taking as input one party's private key and
1972+
another party's public key -- using both to generate a common shared secret.
1973+
The `ecdhKeyDeriveParams.public` property is set to the other party's public
19741974
key.
19751975
19761976
### Class: `EcdsaParams`
@@ -2364,7 +2364,7 @@ The optional customization string for KangarooTwelve.
23642364
added: v25.9.0
23652365
-->
23662366
2367-
* Type: {string} Must be `'KT128'`[^modern-algos] or `'KT256'`[^modern-algos]
2367+
* Type: {string} Must be `'KT128'`[^modern-algos] or `'KT256'`[^modern-algos].
23682368
23692369
#### `kangarooTwelveParams.outputLength`
23702370
@@ -2770,7 +2770,7 @@ The optional domain separation byte (0x01-0x7f). Defaults to `0x1f`.
27702770
added: v25.9.0
27712771
-->
27722772
2773-
* Type: {string} Must be `'TurboSHAKE128'`[^modern-algos] or `'TurboSHAKE256'`[^modern-algos]
2773+
* Type: {string} Must be `'TurboSHAKE128'`[^modern-algos] or `'TurboSHAKE256'`[^modern-algos].
27742774
27752775
#### `turboShakeParams.outputLength`
27762776

0 commit comments

Comments
 (0)