hash.digest([encoding])


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

🌐 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.

Hash 对象在调用 hash.digest() 方法后无法再次使用。多次调用会导致抛出错误。

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