hash.digest([encoding])


计算传入要被哈希(使用 hash.update() 方法)的所有数据的摘要。 如果提供了 encoding,则返回字符串,否则返回 Buffer

调用 hash.digest() 方法之后, Hash 对象不能被再次使用。 多次调用将会导致抛出错误。

Calculates the digest of all of the data passed to be hashed (using the hash.update() method). If encoding is provided a string will be returned; otherwise a Buffer is returned.

The Hash object can not be used again after hash.digest() method has been called. Multiple calls will cause an error to be thrown.