Cipher.prototype._write = function(chunk, enc, callback) { if ( chunk instanceof Buffer ) { this._cipher.update( chunk.delegate.bytes ); } else { this._cipher.update(Helper.bytes( chunk, Buffer.encodingToJava( enc ) ) ); } callback(); }
Sign.prototype._write = function(chunk, enc, callback) { if ( chunk instanceof Buffer ) { this._buffer.appendBuffer( chunk.delegate) } else { this._buffer.appendBytes(Helper.bytes( chunk, Buffer.encodingToJava( enc ) ) ); } callback(); }