hmac.update(data[, inputEncoding])
data
<string> | <Buffer> | <TypedArray> | <DataView>inputEncoding
<string>data
字符串的编码。
使用给定的 data
更新 Hmac
内容,其编码在 inputEncoding
中给出。
如果未提供 encoding
,且 data
是字符串,则强制为 'utf8'
编码。
如果 data
是 Buffer
、TypedArray
或 DataView
,则忽略 inputEncoding
。
这可以在流式传输时使用新数据多次调用。
data
<string> | <Buffer> | <TypedArray> | <DataView>inputEncoding
<string> The encoding of thedata
string.
Updates the Hmac
content with the given data
, the encoding of which
is given in inputEncoding
.
If encoding
is not provided, and the data
is a string, an
encoding of 'utf8'
is enforced. If data
is a Buffer
, TypedArray
, or
DataView
, then inputEncoding
is ignored.
This can be called many times with new data as it is streamed.