diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 43e6167d2ef520..62cf5106f959fd 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -601,7 +601,7 @@ called. Multiple calls will cause an error to be thrown. Updates the hash content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or `'binary'`. If `encoding` is not provided, and the `data` is a string, an -encoding of `'binary'` is enforced. If `data` is a [`Buffer`][] then +encoding of `'binary'` is implied. If `data` is a [`Buffer`][] then `input_encoding` is ignored. This can be called many times with new data as it is streamed. @@ -674,7 +674,7 @@ called. Multiple calls to `hmac.digest()` will result in an error being thrown. Updates the `Hmac` content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or `'binary'`. If `encoding` is not provided, and the `data` is a string, an -encoding of `'utf8'` is enforced. If `data` is a [`Buffer`][] then +encoding of `'binary'` is implied. If `data` is a [`Buffer`][] then `input_encoding` is ignored. This can be called many times with new data as it is streamed. @@ -765,7 +765,7 @@ called. Multiple calls to `sign.sign()` will result in an error being thrown. Updates the `Sign` content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or `'binary'`. If `encoding` is not provided, and the `data` is a string, an -encoding of `'utf8'` is enforced. If `data` is a [`Buffer`][] then +encoding of `'binary'` is implied. If `data` is a [`Buffer`][] then `input_encoding` is ignored. This can be called many times with new data as it is streamed. @@ -817,7 +817,7 @@ console.log(verify.verify(public_key, signature)); Updates the `Verify` content with the given `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or `'binary'`. If `encoding` is not provided, and the `data` is a string, an -encoding of `'utf8'` is enforced. If `data` is a [`Buffer`][] then +encoding of `'binary'` is implied. If `data` is a [`Buffer`][] then `input_encoding` is ignored. This can be called many times with new data as it is streamed. @@ -848,7 +848,7 @@ or [buffers][`Buffer`]. The default value is `'buffer'`, which makes methods default to [`Buffer`][] objects. The `crypto.DEFAULT_ENCODING` mechanism is provided for backwards compatibility -with legacy programs that expect `'binary'` to be the default encoding. +with legacy programs that expect `'utf8'` to be the default encoding. New applications should expect the default to be `'buffer'`. This property may become deprecated in a future Node.js release.