doc: mention `binary` as deafult for Hash strings
authorMathias Bynens <mathias@qiwi.be>
Thu, 12 Dec 2013 04:39:22 +0000 (20:39 -0800)
committerTimothy J Fontaine <tjfontaine@gmail.com>
Thu, 12 Dec 2013 04:39:22 +0000 (20:39 -0800)
doc/api/crypto.markdown

index 1aba68e..8dd9b7c 100644 (file)
@@ -100,8 +100,9 @@ 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.
+`'binary'`.  If no encoding is provided and the input is a string an
+encoding of `'binary'` is enforced. If `data` is a `Buffer` then
+`input_encoding` is ignored.
 
 This can be called many times with new data as it is streamed.