MCPcopy Index your code
hub / github.com/nodejs/node / update

Function update

lib/internal/crypto/cipher.js:153–169  ·  view source on GitHub ↗
(data, inputEncoding, outputEncoding)

Source from the content-addressed store, hash-verified

151};
152
153function update(data, inputEncoding, outputEncoding) {
154 if (typeof data === 'string') {
155 validateEncoding(data, inputEncoding);
156 } else if (!isArrayBufferView(data)) {
157 throw new ERR_INVALID_ARG_TYPE(
158 'data', ['string', 'Buffer', 'TypedArray', 'DataView'], data);
159 }
160
161 const ret = this[kHandle].update(data, inputEncoding);
162
163 if (outputEncoding && outputEncoding !== 'buffer') {
164 this._decoder = getDecoder(this._decoder, outputEncoding);
165 return this._decoder.write(ret);
166 }
167
168 return ret;
169};
170
171function final(outputEncoding) {
172 const ret = this[kHandle].final();

Callers

nothing calls this directly

Calls 3

getDecoderFunction · 0.85
updateMethod · 0.65
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…