What do you mean [0]?

return crypto.createHash('sha256').update(s).digest('binary')[0];

The code on the node
What does the index at the end?
(s - string)
July 9th 19 at 13:33
2 answers
July 9th 19 at 13:35
Return the first character sahusilawane line.
July 9th 19 at 13:37
Return the first character sahusilawane line.

Return zero bytes of hash. Like working with PAnsiChar where to pass a string, you need to pass a pointer to the first character.

Find more questions by tags HashingJavaScriptNode.js