From 0be5a94c56534c0debaf5416eac42d48c9617404 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Mon, 21 Oct 2013 16:26:29 +0400 Subject: [PATCH] doc: encoding is ignored if input is a Buffer NOTE: it wasn't in 0.8 fixes #6386 --- doc/api/crypto.markdown | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index 27b03622e8..e0fe26f5bd 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -101,6 +101,7 @@ Returned by `crypto.createHash`. 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 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. @@ -191,6 +192,7 @@ methods are also supported. Updates the cipher with `data`, the encoding of which is given in `input_encoding` and can be `'utf8'`, `'ascii'` or `'binary'`. If no 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 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'`, `'base64'` or `'hex'`. If no encoding is provided, then a buffer is expected. +If `data` is a `Buffer` then `input_encoding` is ignored. The `output_decoding` specifies in what format to return the deciphered plaintext: `'binary'`, `'ascii'` or `'utf8'`. If no