Decipher.prototype.update - Node documentation
method Decipher.prototype.update

Usage in Deno

import { Decipher } from "node:crypto";
Decipher.prototype.update(data: ArrayBufferView): Buffer

Updates the decipher with data. If the inputEncoding argument is given, the dataargument is a string using the specified encoding. If the inputEncodingargument is not given, data must be a Buffer. If data is a Buffer then inputEncoding is ignored.

The outputEncoding specifies the output format of the enciphered data. If the outputEncodingis specified, a string using the specified encoding is returned. If nooutputEncoding is provided, a Buffer is returned.

The decipher.update() method can be called multiple times with new data until decipher.final() is called. Calling decipher.update() after decipher.final() will result in an error being thrown.

Parameters

data: ArrayBufferView

Return Type

Buffer
Decipher.prototype.update(
data: string,
inputEncoding: Encoding,
): Buffer

Parameters

data: string
inputEncoding: Encoding

Return Type

Buffer
Decipher.prototype.update(
data: ArrayBufferView,
inputEncoding: undefined,
outputEncoding: Encoding,
): string

Parameters

data: ArrayBufferView
inputEncoding: undefined
outputEncoding: Encoding

Return Type

string
Decipher.prototype.update(
data: string,
inputEncoding: Encoding | undefined,
outputEncoding: Encoding,
): string

Parameters

data: string
inputEncoding: Encoding | undefined
outputEncoding: Encoding

Return Type

string