method Cipher.prototype.update
Jump to headingCipher.prototype.update(data: BinaryLike): Buffer
Updates the cipher with data
. If the inputEncoding
argument is given,
the data
argument is a string using the specified encoding. If the inputEncoding
argument is not given, data
must be a Buffer
, TypedArray
, or DataView
. If data
is a Buffer
,
TypedArray
, or DataView
, then inputEncoding
is ignored.
The outputEncoding
specifies the output format of the enciphered
data. If the outputEncoding
is specified, a string using the specified encoding is returned. If nooutputEncoding
is provided, a Buffer
is returned.
The cipher.update()
method can be called multiple times with new data until cipher.final()
is called. Calling cipher.update()
after cipher.final()
will result in an error being
thrown.
Parameters Jump to heading
Return Type Jump to heading
Buffer
Jump to headingCipher.prototype.update(data: string,inputEncoding: Encoding,): Buffer
Parameters Jump to heading
Jump to headingdata: string
Jump to headinginputEncoding: Encoding
Return Type Jump to heading
Buffer
Jump to headingCipher.prototype.update(): string
Parameters Jump to heading
Jump to headingdata: ArrayBufferView
Jump to headinginputEncoding: undefined
Jump to headingoutputEncoding: Encoding
Return Type Jump to heading
string
Jump to headingCipher.prototype.update(): string
Parameters Jump to heading
Jump to headingdata: string
Jump to headinginputEncoding: Encoding | undefined
Jump to headingoutputEncoding: Encoding
Return Type Jump to heading
string