Commit c15a227c authored by Victor Antonio Barzana Crespo's avatar Victor Antonio Barzana Crespo Committed by Rich Trott
Browse files

doc: set encoding to hex before piping hash

I found out that piping a hash to the stdout output would print a
non-hex set of characters, however, the examples are intended to print
out a hex-encoded output so, my proposal here is simple, we set the
encoding to `hex` before piping the response of the hash algo by calling
`hash.setEncoding('hex');`. With this the example is fixed

PR-URL: https://github.com/nodejs/node/pull/35338


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarTobias Nießen <tniessen@tnie.de>
Reviewed-By: default avatarDaijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
parent 73900983
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment