hmac.digest([encoding])
计算使用 hmac.update()
传入的所有数据的 HMAC 摘要。如果提供了 encoding
,则返回一个字符串;否则返回 Buffer
;
¥Calculates the HMAC digest of all of the data passed using hmac.update()
.
If encoding
is
provided a string is returned; otherwise a Buffer
is returned;
Hmac
对象在 hmac.digest()
被调用后不能再次使用。多次调用 hmac.digest()
将导致抛出错误。
¥The Hmac
object can not be used again after hmac.digest()
has been
called. Multiple calls to hmac.digest()
will result in an error being thrown.