Skip to content

Commit

Permalink
doc: standardize on pseudorandom
Browse files Browse the repository at this point in the history
Our docs use both _pseudo-random_ and _pseudorandom_. Standardize on
_pseudorandom_.

PR-URL: #38196
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Trott authored and RaisinTen committed Apr 13, 2021
1 parent f1027ec commit 4def7c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -3605,7 +3605,7 @@ added: v15.8.0
* `err` {Error}
* `prime` {ArrayBuffer|bigint}

Generates a pseudo-random prime of `size` bits.
Generates a pseudorandom prime of `size` bits.

If `options.safe` is `true`, the prime will be a safe prime -- that is,
`(prime - 1) / 2` will also be a prime.
Expand Down Expand Up @@ -3645,7 +3645,7 @@ added: v15.8.0
as a `bigint`.
* Returns: {ArrayBuffer|bigint}

Generates a pseudo-random prime of `size` bits.
Generates a pseudorandom prime of `size` bits.

If `options.safe` is `true`, the prime will be a safe prime -- that is,
`(prime - 1) / 2` will also be a prime.
Expand Down Expand Up @@ -4316,7 +4316,7 @@ changes:
* `buf` {Buffer}
* Returns: {Buffer} if the `callback` function is not provided.

Generates cryptographically strong pseudo-random data. The `size` argument
Generates cryptographically strong pseudorandom data. The `size` argument
is a number indicating the number of bytes to generate.

If a `callback` function is provided, the bytes are generated asynchronously
Expand Down Expand Up @@ -5101,10 +5101,10 @@ When passing strings to cryptographic APIs, consider the following factors.

* Not all byte sequences are valid UTF-8 strings. Therefore, when a byte
sequence of length `n` is derived from a string, its entropy is generally
lower than the entropy of a random or pseudo-random `n` byte sequence.
lower than the entropy of a random or pseudorandom `n` byte sequence.
For example, no UTF-8 string will result in the byte sequence `c0 af`. Secret
keys should almost exclusively be random or pseudo-random byte sequences.
* Similarly, when converting random or pseudo-random byte sequences to UTF-8
keys should almost exclusively be random or pseudorandom byte sequences.
* Similarly, when converting random or pseudorandom byte sequences to UTF-8
strings, subsequences that do not represent valid code points may be replaced
by the Unicode replacement character (`U+FFFD`). The byte representation of
the resulting Unicode string may, therefore, not be equal to the byte sequence
Expand All @@ -5119,7 +5119,7 @@ When passing strings to cryptographic APIs, consider the following factors.
```

The outputs of ciphers, hash functions, signature algorithms, and key
derivation functions are pseudo-random byte sequences and should not be
derivation functions are pseudorandom byte sequences and should not be
used as Unicode strings.
* When strings are obtained from user input, some Unicode characters can be
represented in multiple equivalent ways that result in different byte
Expand Down
4 changes: 2 additions & 2 deletions doc/api/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ changes:
**Default:** none, see `minVersion`.
* `sessionIdContext` {string} Opaque identifier used by servers to ensure
session state is not shared between applications. Unused by clients.
* `ticketKeys`: {Buffer} 48-bytes of cryptographically strong pseudo-random
* `ticketKeys`: {Buffer} 48-bytes of cryptographically strong pseudorandom
data. See [Session Resumption][] for more information.
* `sessionTimeout` {number} The number of seconds after which a TLS session
created by the server will no longer be resumable. See
Expand Down Expand Up @@ -1915,7 +1915,7 @@ changes:
If `callback` is called with a falsy `ctx` argument, the default secure
context of the server will be used. If `SNICallback` wasn't provided the
default callback with high-level API will be used (see below).
* `ticketKeys`: {Buffer} 48-bytes of cryptographically strong pseudo-random
* `ticketKeys`: {Buffer} 48-bytes of cryptographically strong pseudorandom
data. See [Session Resumption][] for more information.
* `pskCallback` {Function}
* socket: {tls.TLSSocket} the server [`tls.TLSSocket`][] instance for
Expand Down
4 changes: 2 additions & 2 deletions doc/api/webcrypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ added: v15.0.0
* Type: {ArrayBuffer|TypedArray|DataView|Buffer}

The salt value significantly improves the strength of the HKDF algorithm.
It should be random or pseudo-random and should be the same length as the
It should be random or pseudorandom and should be the same length as the
output of the digest function (for instance, if using `'SHA-256'` as the
digest, the salt should be 256-bits of random data).

Expand Down Expand Up @@ -1327,7 +1327,7 @@ added: v15.0.0

* Type: {ArrayBuffer|TypedArray|DataView|Buffer}

Should be at least 16 random or pseudo-random bytes.
Should be at least 16 random or pseudorandom bytes.

### Class: `RsaHashedImportParams`
<!-- YAML
Expand Down

0 comments on commit 4def7c4

Please sign in to comment.