Browse Source

doc: encoding is ignored if input is a Buffer

NOTE: it wasn't in 0.8

fixes #6386
v0.10.22-release
Fedor Indutny 11 years ago
committed by Timothy J Fontaine
parent
commit
0be5a94c56
  1. 3
      doc/api/crypto.markdown

3
doc/api/crypto.markdown

@ -101,6 +101,7 @@ Returned by `crypto.createHash`.
Updates the hash content with the given `data`, the encoding of which Updates the hash content with the given `data`, the encoding of which
is given in `input_encoding` and can be `'utf8'`, `'ascii'` or is given in `input_encoding` and can be `'utf8'`, `'ascii'` or
`'binary'`. If no encoding is provided, then a buffer is expected. `'binary'`. If no encoding is provided, then a buffer is expected.
If `data` is a `Buffer` then `input_encoding` is ignored.
This can be called many times with new data as it is streamed. This can be called many times with new data as it is streamed.
@ -191,6 +192,7 @@ methods are also supported.
Updates the cipher with `data`, the encoding of which is given in Updates the cipher with `data`, the encoding of which is given in
`input_encoding` and can be `'utf8'`, `'ascii'` or `'binary'`. If no `input_encoding` and can be `'utf8'`, `'ascii'` or `'binary'`. If no
encoding is provided, then a buffer is expected. encoding is provided, then a buffer is expected.
If `data` is a `Buffer` then `input_encoding` is ignored.
The `output_encoding` specifies the output format of the enciphered The `output_encoding` specifies the output format of the enciphered
data, and can be `'binary'`, `'base64'` or `'hex'`. If no encoding is data, and can be `'binary'`, `'base64'` or `'hex'`. If no encoding is
@ -243,6 +245,7 @@ plain-text data on the the readable side. The legacy `update` and
Updates the decipher with `data`, which is encoded in `'binary'`, Updates the decipher with `data`, which is encoded in `'binary'`,
`'base64'` or `'hex'`. If no encoding is provided, then a buffer is `'base64'` or `'hex'`. If no encoding is provided, then a buffer is
expected. expected.
If `data` is a `Buffer` then `input_encoding` is ignored.
The `output_decoding` specifies in what format to return the The `output_decoding` specifies in what format to return the
deciphered plaintext: `'binary'`, `'ascii'` or `'utf8'`. If no deciphered plaintext: `'binary'`, `'ascii'` or `'utf8'`. If no

Loading…
Cancel
Save